Skip to main content

Module server

Module server 

Source
Expand description

Axum-backed in-process mock LLM server.

MockLlm serves one provider endpoint from a caller-supplied responder closure. Per request it records facts useful for assertions (call count, tool declarations, tool_call_ids of returned tool results) into a shared MockState, derives RequestFacts, and returns whatever the responder builds (typically via crate::shapes).

Structs§

MockHandle
Handle to a spawned mock server.
MockLlm
Builder for an in-process mock LLM server.
MockState
Shared request-fact recorder. Cheap to clone; all clones share state.
RequestFacts
Facts derived from one incoming request, handed to the responder.

Enums§

Provider
Which provider wire the mock speaks.