Skip to content

yaab.testing

Offline deterministic models for tests and examples.

yaab.testing

Testing utilities — deterministic models and fixtures, no API keys needed.

FunctionModel

A model whose response is computed by a user-supplied function.

TestModel

A scripted, deterministic model.

Parameters

custom_output: Text to return as the final assistant message. responses: A sequence of :class:ModelResponse (or strings) returned in order, one per complete call. Overrides custom_output when set. call_tools: Tool names to call (with empty args) on the first response, before producing a final text answer. Useful for exercising the tool loop. structured_output: A dict returned (JSON-encoded) when the agent requests structured output, so output validation can be tested without a real model.