v2.19.0

pydantic/pydantic-aiv2.19.0Jul 28, 2026by dsfaccini

AI Summary

Enhances `ModelHTTPError` with `headers` and `retry_after` fields. Fixes external cancellation handling at run step boundaries and updates the FastMCP dependency range.

Key Highlights

  • Add `headers` and `retry_after` to `ModelHTTPError`
  • Re-assert absorbed external cancellation at run step boundaries
  • Update FastMCP dependency range to `<4`

New Features

  • Enhanced error details in `ModelHTTPError`

Full Release Notes

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

## What's Changed
### 🚀 Features
* Add `headers` and `retry_after` to `ModelHTTPError`, populate from all provider SDKs by @dmontagu in https://github.com/pydantic/pydantic-ai/pull/6733
### 🐛 Bug Fixes
* Re-assert absorbed external cancellation at run step boundaries by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6496
### 📦 Dependencies
* Update FastMCP dependency range to `<4` by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6737


**Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.18.0...v2.19.0