v1.39.0
pydantic/pydantic-aiv1.39.0Dec 24, 2025by DouweM
AI Summary
This release introduces support for embedding models and exposes agent and run metadata on result objects and span attributes. It also enhances system prompt handling and adds support for `ThinkingPart` in MCP Sampling.
Key Highlights
- Added support for embedding models
- Exposed agent and agent run metadata on result objects and span attributes
- Allowed system prompts functions to return `None`
- Added `bedrock_service_tier` setting to `BedrockModelSettings`
- Handle `ThinkingPart` in MCP Sampling
New Features
- Embedding model support
- Metadata exposure on result objects and spans
- System prompt functions returning `None`
- MCP Sampling `ThinkingPart` handling
- Bedrock service tier configuration
Full Release Notes
## What's Changed * Support embedding models by @DouweM and @dmontagu in https://github.com/pydantic/pydantic-ai/pull/3252 * Add Agent and agent run metadata and expose it on result objects and span attributes by @sstanovnik in https://github.com/pydantic/pydantic-ai/pull/3370 * Support system prompts functions returning `None` by @mrdkucher in https://github.com/pydantic/pydantic-ai/pull/3834 * Handle ThinkingPart in MCP Sampling by @eekstunt in https://github.com/pydantic/pydantic-ai/pull/3823 * Add `bedrock_service_tier` setting to `BedrockModelSettings` by @lukekh in https://github.com/pydantic/pydantic-ai/pull/3773 * Add docs and tests for `RunContext.partial_output` in output tools by @Danipulok in https://github.com/pydantic/pydantic-ai/pull/3726 * Update docs about choosing priority of output and deferred tool calls with run_stream by @Danipulok in https://github.com/pydantic/pydantic-ai/pull/3725 * docs: Fix cross references by @sanxiyn in https://github.com/pydantic/pydantic-ai/pull/3809 * Add pydantic-deep + toolsets to docs by @DouweM in https://github.com/pydantic/pydantic-ai/pull/3837 ## New Contributors * @sanxiyn made their first contribution in https://github.com/pydantic/pydantic-ai/pull/3809 * @eekstunt made their first contribution in https://github.com/pydantic/pydantic-ai/pull/3823 * @sstanovnik made their first contribution in https://github.com/pydantic/pydantic-ai/pull/3370 * @mrdkucher made their first contribution in https://github.com/pydantic/pydantic-ai/pull/3834 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.38.0...v1.39.0