v2.45.0

pydantic/pydantic-aiv2.45.0Sep 18, 2026by DouweM

Upgrading?

AI Summary

This release introduces a new `TypeSafeModel` for TypeSafe's Jev and includes performance optimizations for durable runs. It also fixes compatibility issues with FastMCP 4 by removing legacy `httpx` imports and improves Bedrock support.

Key Highlights

  • Added `TypeSafeModel` for TypeSafe's Jev
  • Optimized `DynamicToolset` and MCP server sessions to be resolved once per durable run
  • Fixed Bedrock integration to support `xhigh` effort and new GPT model variants
  • Removed legacy `httpx` imports for compatibility with FastMCP 4

New Features

  • Add `TypeSafeModel` for TypeSafe's Jev

Full Release Notes

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

## What's Changed
### 🚀 Features
* Add `TypeSafeModel` for TypeSafe's Jev by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/8450
### 🐛 Bug Fixes
* Pass `xhigh` effort through on Bedrock when the model profile supports it by @willfrey in https://github.com/pydantic/pydantic-ai/pull/8392
* Allow `gpt-5.6-sol`, `gpt-5.6-luna`, and `gpt-5.6-terra` on Bedrock Converse by [@pydanty](https://github.com/apps/pydanty) in https://github.com/pydantic/pydantic-ai/pull/7825
* Resolve a `DynamicToolset` once per durable run instead of inside every durable unit by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8455
* Hold one MCP server session per durable run instead of one per durable unit by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8463
* Preserve tool history in `MCPSamplingModel` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8466
* Stop importing legacy `httpx` in `pydantic_ai.mcp`, which a FastMCP 4 install does not ship by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8461
* Report each agent run's own usage on its span by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8456

## New Contributors
* @willfrey made their first contribution in https://github.com/pydantic/pydantic-ai/pull/8392

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.44.0...v2.45.0

Related Repositories