v1.92.0

pydantic/pydantic-aiv1.92.0May 8, 2026by DouweM

AI Summary

Adds Anthropic task budget support and output retries override.

Key Highlights

  • Add Anthropic task budget support
  • Add runtime output_retries override
  • Fix cleanup of streaming responses on cancellation
  • Fix MCP session execution in dedicated task
  • Populate RunContext with run_id and metadata

New Features

  • Anthropic task budget support
  • Output retries override
  • Streaming cleanup fix
  • MCP session fix
  • RunContext population

Full Release Notes

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

## What's Changed
### 🚀 Features
* Add Anthropic task budget support by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5140
* Add runtime `output_retries` override + deprecate `retries` + internal retry-field rename by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/5075
### 🐛 Bug Fixes
* Fix: Clean up streaming responses on cancellation by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/5313
* Fix `attempted exit cancel scope in different task` by running MCP session in a dedicated task by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/4514
* Populate `for_run` `RunContext` with `run_id`, `conversation_id`, and `metadata` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/5330
* fix(evals): guarantee `CaseLifecycle.teardown()` by @voorhs in https://github.com/pydantic/pydantic-ai/pull/5322

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

**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.91.0...v1.92.0