v2.10.0
pydantic/pydantic-aiv2.10.0Jul 15, 2026by dsfaccini
AI Summary
This release improves provider compatibility by making `message_history` provider-valid out of the box to repair tool-call/result pairing. It also adds support for OpenAI background mode and Anthropic's `stop_reason=pause_turn`, alongside several bug fixes and a security dependency update.
Key Highlights
- `message_history` is now provider-valid out of the box
- Support for OpenAI background mode and Anthropic `stop_reason=pause_turn`
- Security update: Bump `transformers` floor to >=5.5.0 for CVE-2026-5241
- Fix for `RenamedToolset` silently dropping tools on collision
- Fix event-loop affinity in `run_stream_sync`
New Features
- OpenAI background mode support
- Anthropic `stop_reason=pause_turn` handling
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * 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 ### 🐛 Bug Fixes * 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 ### 📦 Dependencies * Bump `transformers` floor to >=5.5.0 for CVE-2026-5241 by @hramezani in https://github.com/pydantic/pydantic-ai/pull/6482 ## New Contributors * @sean-kim05 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6466 * @ShawnChen-Sirius made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6467 * @deepakdevp made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4718 * @hxaxd made their first contribution in https://github.com/pydantic/pydantic-ai/pull/6463 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.9.1...v2.10.0