{"enrichment":{"faq":[{"a":"pydantic-ai-testing enables unit testing of PydanticAI agents by replacing live LLM calls with TestModel for deterministic outputs or FunctionModel for custom logic. Use context managers to override the agent's model during tests, preventing real API calls while validating agent behavior, tool invocations, and structured outputs.","q":"How to test pydantic ai agents without making real API calls?"},{"a":"pydantic-ai-testing provides override mechanisms to inject mock models and dependencies into agents. TestModel returns fixed responses for reproducible tests, while FunctionModel lets you define custom logic to simulate LLM behavior. Both integrate via context managers, allowing you to control agent execution flow without external API dependencies.","q":"How do I mock dependencies in pydantic ai testing?"},{"a":"Yes, pydantic-ai-testing supports VCR cassettes to record and replay LLM interactions. Capture real API responses once, then replay them in subsequent test runs for deterministic, fast tests without repeated API calls. This bridges live testing and mocking, letting you validate against realistic LLM behavior.","q":"Can pydantic-ai-testing record and replay real API interactions?"},{"a":"pydantic-ai-testing lets you test agent tools by forcing specific tool calls through FunctionModel or capturing tool invocations in test assertions. Validate that tools are called with correct arguments, return expected values, and integrate properly with agent decision-making logic.","q":"How does pydantic-ai-testing verify tool calls in agents?"},{"a":"pydantic-ai-testing supports TestModel for deterministic outputs, FunctionModel for custom logic, VCR cassettes for recorded interactions, inline snapshots for output validation, and context manager overrides for dependency injection. These patterns enable comprehensive unit testing, integration testing, and behavior verification of PydanticAI agents.","q":"What testing patterns does pydantic-ai-testing support?"},{"a":"Yes, pydantic-ai-testing integrates seamlessly with pytest. Use fixtures to set up test agents, leverage context managers for model overrides, and combine with pytest's assertion and snapshot plugins for inline snapshot testing. The framework is designed for standard Python testing workflows.","q":"Does pydantic-ai-testing work with pytest?"}],"shadow_tags":["agent-testing","mock-responses","test-doubles","deterministic-testing","vcr-recording","snapshot-testing","dependency-injection","tool-mocking","integration-testing","pytest-patterns"],"summary_rewrite":"Write unit tests for PydanticAI agents without calling real APIs using TestModel for deterministic outputs, FunctionModel for custom logic, or VCR cassettes to replay recorded interactions. Mock dependencies, force tool calls, and validate agent behavior with inline snapshots."},"files":[{"bytes":7161,"path":"plugins/beagle-ai/skills/pydantic-ai-testing/SKILL.md","sha256":"f66c90456241aee816ddb8cf0e513055fcffbbd5405b2d48ba548813546e0cbe","url":"https://skillfed.io/files/existential-birds/beagle/pydantic-ai-testing/7289c976/SKILL.md"}],"id":"existential-birds/beagle/pydantic-ai-testing","links":{"html":"https://skillfed.io/existential-birds/beagle/pydantic-ai-testing","md":"https://skillfed.io/existential-birds/beagle/pydantic-ai-testing.md","repo":"https://github.com/existential-birds/beagle"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":10,"language":"TypeScript","last_updated":"2026-07-21","license":"Apache-2.0","name":"pydantic-ai-testing","publisher":"existential-birds","stars":74},"relations":{"similar":[{"id":"cline/skills/building-pydantic-ai-agents"},{"id":"pydantic/skills/building-pydantic-ai-agents"},{"id":"itechmeat/llm-code/pydantic-ai"},{"id":"existential-birds/beagle/pydantic-ai-dependency-injection"},{"id":"DougTrajano/pydantic-ai-skills/pydanticai-docs"},{"id":"existential-birds/beagle/pydantic-ai-agent-creation"},{"id":"existential-birds/beagle/pydantic-ai-common-pitfalls"},{"id":"existential-birds/beagle/pydantic-ai-model-integration"},{"id":"alinaqi/maggy/agentic-development"},{"id":"fernandofuc/nextjs-c-s/agent-builder-pydantic-ai"}]},"slug":{"owner":"existential-birds","repo":"beagle","skill":"pydantic-ai-testing"},"version":"7289c976"}
