pydantic-ai v2.10.0: Tool pairing, OpenAI/Anthropic support, bug fixes
Version 2.10.0 of pydantic-ai enhances tool integration by improving message history provider validation and adding support for OpenAI background mode and Anthropic pauses. It also addresses several bugs, including issues with usage details, tool renaming, UTF-8 handling, event-loop affinity, and tool call attachment. A dependency update to `transformers` addresses a security vulnerability, affecting users of these libraries.
- →Fix has_values() returning True for all-zero usage details by @sean-kim05 in https://github.com/pydantic/pydantic-ai/pull/6466
- →Fix RenamedToolset silently dropping a tool on a name collision by @sean-kim05 in https://github.com/pydantic/pydantic-ai/pull/6462
- →Preserve invalid UTF-8 bytes in instrumentation serialization by @alexmojaki in https://github.com/pydantic/pydantic-ai/pull/6483
- →Fix event-loop affinity in run_stream_sync by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6454
- →Attach xAI ToolCallPart to the preceding reasoning message by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5924
Features (2) ›
Make message_history provider-valid out of the box (repair tool-call/result pairing) by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6319
Add support for OpenAI background mode and handle Anthropic stop_reason=pause_turn by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6303
Fixes (7) ›
- Fix has_values() returning True for all-zero usage details by @sean-kim05 in https://github.com/pydantic/pydantic-ai/pull/6466
- Fix RenamedToolset silently dropping a tool on a name collision by @sean-kim05 in https://github.com/pydantic/pydantic-ai/pull/6462
- Preserve invalid UTF-8 bytes in instrumentation serialization by @alexmojaki in https://github.com/pydantic/pydantic-ai/pull/6483
- Fix event-loop affinity in run_stream_sync by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6454
- Attach xAI ToolCallPart to the preceding reasoning message by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5924
- Filter unconfigured Anthropic native tool calls by @hxaxd in https://github.com/pydantic/pydantic-ai/pull/6463
Fix DeferredToolResults resume when an output tool call was settled in the same batch as deferred calls by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6491
https://github.com/pydantic/pydantic-ai/releases/tag/v2.10.0
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 ·
- 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 ·