v1.72.0

pydantic/pydantic-aiv1.72.0Mar 26, 2026by DouweM

AI Summary

Enhances Anthropic integration with eager input streaming and sync tool preparation, while improving MCP capabilities and fixing various type inference and serialization issues.

Key Highlights

  • Added `anthropic_eager_input_streaming` to `AnthropicModelSettings`.
  • Added support for sync tool preparation functions.
  • Simplified MCP capability URL requirement.
  • Fixed `Thinking` capability type inference.
  • Fixed `ToolReturn` metadata preservation through Temporal serialization.

New Features

  • Eager input streaming
  • Sync tool preparation
  • Simplified MCP URL requirement

Full Release Notes

<!-- Release notes generated using configuration in .github/release.yml at main -->

## What's Changed
### 🚀 Features
* feat: add `anthropic_eager_input_streaming` to `AnthropicModelSettings` by @moe9195 in https://github.com/pydantic/pydantic-ai/pull/4842
* Support sync tool preparation functions by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4846
* Don't require explicit `url=` on `MCP` capability, in Python or `AgentSpec` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4846
### 🐛 Bug Fixes
* Fix `Thinking` capability type inference by @DouweM in https://github.com/pydantic/pydantic-ai/pull/4846
* fix: add missing `OpenRouterReasoning` effort values by @majdalsado in https://github.com/pydantic/pydantic-ai/pull/4709
* fix: preserve `ToolReturn` metadata through Temporal serialization by @alvinttang in https://github.com/pydantic/pydantic-ai/pull/4684
* fix: Insert empty user message for Bedrock when only instructions are present by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/4498

## New Contributors
* @ddanielcruzz made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4837
* @alvinttang made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4684
* @moe9195 made their first contribution in https://github.com/pydantic/pydantic-ai/pull/4842

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.71.0...v1.72.0