Pydantic-AI v2.47.0 Improves Type Safety and Error Handling for Model Outputs
sdkaigaengineerpython-agentic
breaking feature patch
Pydantic-AI v2.47.0 has been released, introducing several enhancements and critical bug fixes. This update includes compatibility changes for output route naming and user prompt content validation, along with new capabilities for TypeSafeModel to answer more field types. Developers using Pydantic-AI will benefit from improved robustness in handling model outputs, better error messaging for invalid configurations, and more flexible routing options, ensuring greater stability in AI application development.
- →Ask three more field types TypeSafeModel can already answer by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8544
- →Refuse a tuple output field and a self-contained model instead of crashing by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8537
- →Refuse a rubric with more levels than Jev scores against by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8583
- →Let None be a route TypeSafeModel can pick by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8540
- →Let a Choices set describe itself as a TypeSafeModel route by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8541
Features (1) ›
- Ask three more field types TypeSafeModel can already answer by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8544
Fixes (6) ›
- Refuse a tuple output field and a self-contained model instead of crashing by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8537
- Refuse a rubric with more levels than Jev scores against by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8583
- Let None be a route TypeSafeModel can pick by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8540
- Let a Choices set describe itself as a TypeSafeModel route by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8541
- Recognise a None route and a None option that carry a description by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8598
- Name the picked route in the TypeSafeModel request that fills it by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8589
Maintenance (1) ›
- Pin ag-ui-protocol to <1 by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8579
Read the original announcement →
https://github.com/pydantic/pydantic-ai/releases/tag/v2.47.0
Related releases
- LangGraph 1.2.12 improves subgraph detection and adds interrupt response schema LangGraph Releases ·
- LangGraph SDK 0.4.5 Adds `response_schema` to `interrupt()` Method LangGraph Releases ·
- Pydantic-AI v2.46.0 Enhances Type-Safe Models, Tooling, and Real-Time AI Sessions Pydantic AI Releases ·
- ADK-Python v2.9.2 Refines OpenTelemetry Event Naming for Consistent Tracking Google ADK (Python) Releases ·
- Pydantic AI Library v2.45.0 Adds TypeSafeModel and Bedrock Converse Support Pydantic AI Releases ·
- OpenAI Python Agents Library v0.22.3 Delivers Core Fixes and Dependency Updates OpenAI Agents SDK (Python) Releases ·