Testing PydanticAI Agents TestModel (Deterministic Testing) Use for tests without API calls: TestModel Configuration Override Context Manager FunctionModel (Custom Logic) For complete control over model responses: FunctionModel with Tool Calls VCR Cassettes (Recorded API Calls) Record and replay real LLM API interactions: Cassette files are stored in as YAML. Inline Snapshots Assert expected outputs with auto-updating snapshots: Gates: VCR cassettes and inline snapshots Recording or fixing rewrites files on disk. Follow this sequence; do not skip steps. 1. Replay pass (no record/fix flags): R…