v2.21.0
pydantic/pydantic-aiv2.21.0Jul 30, 2026by dsfaccini
AI Summary
This release adds a new token limit configuration for usage tracking and refreshes the list of known model names to ensure compatibility with Gateway probes and Google image IDs.
Key Highlights
- Added `per_request_input_tokens_limit` to `UsageLimits`
- Refreshed `KnownModelName` from Gateway probes and stable Google image IDs
New Features
- Added `per_request_input_tokens_limit` to `UsageLimits`
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * feat(usage): add `per_request_input_tokens_limit` to `UsageLimits` by @Oxygen56 in https://github.com/pydantic/pydantic-ai/pull/5907 ### 🐛 Bug Fixes * Refresh `KnownModelName` from Gateway probes and stable Google image IDs by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6806 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v2.20.0...v2.21.0