v1.71.0
pydantic/pydantic-aiv1.71.0Mar 24, 2026by DouweM
AI Summary
This is a major feature release introducing 'Capabilities' as composable units of behavior, alongside `AgentSpec` for YAML/JSON loading, `Hooks`, and `Thinking` capabilities.
Key Highlights
- Introduction of Composable `Capabilities` system.
- New `AgentSpec` for loading agents from YAML/JSON.
- New `Thinking` capability with cross-provider support.
- Provider-adaptive tools (WebSearch, WebFetch, MCP, ImageGeneration).
- Added `openai:gpt-5.4-mini` and `gpt-5.4-nano` models.
New Features
- Capabilities system
- AgentSpec
- Thinking capability
- Provider-adaptive tools
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * Add [Capabilities](https://ai.pydantic.dev/capabilities/): composable, reusable units of agent behavior that bundle tools, lifecycle hooks, instructions, and model settings into a single class you plug into any agent by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4640 * Add [`AgentSpec`](https://ai.pydantic.dev/agent-spec/) and `Agent.from_file` for loading agents from YAML/JSON, with support for templated instructions referencing deps (via `TemplateStr`) by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4640 * Add [`Hooks`](https://ai.pydantic.dev/hooks/) capability for defining hooks using decorators by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4640 * Add [`Thinking`](https://ai.pydantic.dev/thinking/) capability and cross-provider `thinking` model setting by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4640 * Add [provider-adaptive tools](https://ai.pydantic.dev/capabilities/#provider-adaptive-tools) capabilities `WebSearch`, `WebFetch`, `MCP`, `ImageGeneration` that automatically fall back from builtin (provider) tools to local tools by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4640 * Add [`AbstractToolset.for_run`](https://ai.pydantic.dev/toolsets/#per-run-and-per-step-lifecycle) and `for_run_step` for state isolation by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4640 * Add `openai:gpt-5.4-mini` and `openai:gpt-5.4-nano` by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/4787 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.70.0...v1.71.0