pydantic-ai v2.5.1: Bug Fixes and Model Compatibility
This patch release for pydantic-ai, version 2.5.1, addresses several bugs and enhances compatibility with various large language model providers. Key fixes include improved handling of tool results, mapping of settings for Groq models, and proper rejection of invalid concurrency settings. The release also ensures better handling of empty model responses and preserves file download settings. These changes benefit developers integrating AI models into their Python applications by stabilizing the library's behavior across different platforms.
- →fix(groq): map unified thinking setting to Groq reasoning_effort by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6231
- →fix(evals): reject non-positive OnlineEvaluator.max_concurrency by @VectorPeak in https://github.com/pydantic/pydantic-ai/pull/6267
- →write relative schema refs for AgentSpec files by @VectorPeak in https://github.com/pydantic/pydantic-ai/pull/6251
- →send retry prompt for empty model responses instead of silent resubmit by @dcosson in https://github.com/pydantic/pydantic-ai/pull/5643
- →Preserve FileUrl.force_download in UI round-trips by @HarperZ9 in https://github.com/pydantic/pydantic-ai/pull/6205
Fixes (11) ›
fix(bedrock): handle toolResult attachment co-location per-model via bedrock_tool_result_colocatable_content by @Hasnaathussain in https://github.com/pydantic/pydantic-ai/pull/6098
- fix(groq): map unified thinking setting to Groq reasoning_effort by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6231
- fix(evals): reject non-positive OnlineEvaluator.max_concurrency by @VectorPeak in https://github.com/pydantic/pydantic-ai/pull/6267
- fix write relative schema refs for AgentSpec files by @VectorPeak in https://github.com/pydantic/pydantic-ai/pull/6251
- send retry prompt for empty model responses instead of silent resubmit by @dcosson in https://github.com/pydantic/pydantic-ai/pull/5643
- Preserve FileUrl.force_download in UI round-trips by @HarperZ9 in https://github.com/pydantic/pydantic-ai/pull/6205
Exclude deprecated Bedrock gateway model anthropic.claude-3-5-sonnet-20240620-v1:0 by @ddanielcruzz in https://github.com/pydantic/pydantic-ai/pull/6297
- fix
preserve union NativeOutput description instead of last member's docstring by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6265
fix(bedrock): deliver unsupported tool-return media to models that isolate toolResult turns by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6259
- Accept thinking-only responses when output_type allows None by @kmike in https://github.com/pydantic/pydantic-ai/pull/5146
- Omit empty ModelResponse from Mistral and Cohere request payloads by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6302
https://github.com/pydantic/pydantic-ai/releases/tag/v2.5.1
Related releases
- Pydantic-AI v2.9.0: Security fix, GPT-5.6 models, usage command Pydantic AI 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 ·
- 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 ·