Skip to content

agentix.providers.mock

mock

A scriptable model for tests and examples — zero provider dependencies.

Drive the loop deterministically by handing :class:MockModel either a fixed list of responses (returned in order) or a callable that computes a response from the current message history.

MockModel

MockModel(script: Sequence[ModelResponse] | Responder)

Returns pre-scripted :class:ModelResponse objects.

script is either: * a list of ModelResponse — popped in order; when exhausted, a final empty response is returned so the loop always terminates; or * a callable (messages) -> ModelResponse for dynamic behavior.