Pydantic-AI v2.9.0: Security fix, GPT-5.6 models, usage command
Pydantic-AI v2.9.0 addresses a security advisory impacting message sanitization and backports a fix to version 1.107.1. This release also introduces new features like GPT-5.6 model support, a `/usage` command for the `clai` CLI, and exposes `usage_limits` to tools. Several bug fixes improve Anthropic Files API integration, message repr handling, FIPS compliance, agent robustness, and output strategies, affecting users of version 2.0.0 and above.
- →Affected: pydantic-ai / pydantic-ai-slim >= 2.0.0, < 2.5.0 (v2) and >= 1.88.0, < 1.107.1 (v1)
- →Patched: 2.5.0 (v2) and 1.107.1 (v1)
- →Add /usage slash command to clai CLI for cumulative token usage by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6245
- →feat(openai): add GPT-5.6 models and reasoning mode by @Wh1isper in https://github.com/pydantic/pydantic-ai/pull/6414
- →feat(RunContext): expose the run's usage_limits to tools and capabilities by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6341
Security (3) ›
- Affected: pydantic-ai / pydantic-ai-slim >= 2.0.0, < 2.5.0 (v2) and >= 1.88.0, < 1.107.1 (v1)
- Patched: 2.5.0 (v2) and 1.107.1 (v1)
Not affected if every sensitive tool uses requires_approval=True / ApprovalRequiredToolset, or if your tool handlers validate their arguments and enforce authorization themselves
Features (3) ›
- Add /usage slash command to clai CLI for cumulative token usage by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6245
- feat(openai): add GPT-5.6 models and reasoning mode by @Wh1isper in https://github.com/pydantic/pydantic-ai/pull/6414
- feat(RunContext): expose the run's usage_limits to tools and capabilities by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6341
Fixes (7) ›
- Auto-enable Anthropic Files API beta when messages contain UploadedFile by @gaurav0107 in https://github.com/pydantic/pydantic-ai/pull/5815
Fix repr() crash on message parts whose field != returns a non-bool (#6415) by @hramezani in https://github.com/pydantic/pydantic-ai/pull/6421
- fix mark non-crypto hashes with usedforsecurity=False (FIPS precaution) by @stef41 in https://github.com/pydantic/pydantic-ai/pull/5053
- Guard against id-less MCPToolset on the DBOSAgent wrapper path by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6406
- fix make nested capture_run_messages capture correctly (#1568) by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6345
Fix cancellation deadlock when a wrapped model request or agent run survives cancellation by @0ywfe in https://github.com/pydantic/pydantic-ai/pull/6426
Honor end_strategy='early' for NativeOutput, PromptedOutput, and image output by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6427
https://github.com/pydantic/pydantic-ai/releases/tag/v2.9.0
Related releases
- LangGraph 1.2.7: Fixes for delta overwrites and UUID generation LangGraph Releases ·
- pydantic-ai v2.1.0: Anthropic web tools, serialization, and bug fixes Pydantic AI Releases ·
- pydantic-ai v2.5.1: Bug Fixes and Model Compatibility Pydantic AI Releases ·
- crewAI 1.15.0: Conversational Flow Tracking and Declarative Flow Loading CrewAI Releases ·
- OpenAI Agents Python Library v0.17.8: Enhancements and Fixes OpenAI Agents SDK (Python) Releases ·
- LangGraph 1.2.9 fixes state metadata handling LangGraph Releases ·