Skip to content

pydantic-ai

v2.13.0 Feature

This release adds 4 notable features for engineering teams evaluating rollout.

βœ“ No known CVEs patched
Read the diff β†’ Tool health β†’ What is this tool? β†’

✓ No known CVEs patched in this version

Topics

agent-framework genai llm pydantic python

Summary

AI summary

Updates πŸš€ Features, πŸ› Bug Fixes, and πŸ“¦ Dependencies across a mixed release.

Changes in this release

Feature Low

Add `include_model_request_parameters` instrumentation setting to omit the `model_request_parameters` span attribute

Add `include_model_request_parameters` instrumentation setting to omit the `model_request_parameters` span attribute

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Feature Low

Add `RaiseContentFilterError` capability to raise content filter error for non-empty responses

Add `RaiseContentFilterError` capability to raise content filter error for non-empty responses

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Feature Low

Add `cache_hit_ratio` property to `RequestUsage` and `RunUsage` objects

Add `cache_hit_ratio` property to `RequestUsage` and `RunUsage` objects

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Feature Low

Add `get_model`, `resolve_model_id`, and `for_agent` capability hooks

Add `get_model`, `resolve_model_id`, and `for_agent` capability hooks

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Dependency Low

Bump dependency `mcp` to version 1.28.1 for Dependabot alerts

Bump dependency `mcp` to version 1.28.1 for Dependabot alerts

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Bugfix Medium

Fix `MistralModel` streaming settings to behave correctly

Fix `MistralModel` streaming settings to behave correctly

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Bugfix Medium

Close open message parts on UI stream error to prevent leaks

Close open message parts on UI stream error to prevent leaks

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Bugfix Medium

Fix spurious OTel `Failed to detach context` error when a streamed run is interrupted mid-segment

Fix spurious OTel `Failed to detach context` error when a streamed run is interrupted mid-segment

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Bugfix Medium

Pass through `pydantic_monty` in workflow sandbox for temporal operations

Pass through `pydantic_monty` in workflow sandbox for temporal operations

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Bugfix Medium

Fix spurious OTel `Failed to detach context` error when a streamed run is interrupted mid-segment (duplicate entry for audit)

Fix spurious OTel `Failed to detach context` error when a streamed run is interrupted mid-segment (duplicate entry for audit)

Source: llm_adapter@2026-07-18

Confidence: high

β€”
Full changelog

What's Changed

πŸš€ Features

  • Add include_model_request_parameters instrumentation setting to omit the model_request_parameters span attribute by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6488
  • Add RaiseContentFilterError capability to raise content filter error for non-empty content filter responses by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6167
  • feat(usage): add cache_hit_ratio property to RequestUsage and RunUsage by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6529
  • Add get_model, resolve_model_id, and for_agent capability hooks by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6333

πŸ› Bug Fixes

  • Fix MistralModel streaming settings by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6563
  • Close open message parts (text, thinking, tool calls) on UI stream error by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6550
  • Fix spurious OTel Failed to detach context error when a streamed run is interrupted mid-segment by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/6572
  • fix(temporal): pass through pydantic_monty in workflow sandbox by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6564

πŸ“¦ Dependencies

  • deps: bump mcp to 1.28.1 for Dependabot alerts by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6562

Full Changelog: https://github.com/pydantic/pydantic-ai/compare/v2.12.0...v2.13.0

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track pydantic-ai

Get notified when new releases ship.

Sign up free

About pydantic-ai

AI Agent Framework, the Pydantic way

All releases β†’

Related context

Earlier breaking changes

  • v1.95.0 rename β€˜built-in tools’ to β€˜native tools’, deprecate old fields, register via capabilities=[NativeTool(...)]

Beta — feedback welcome: [email protected]