v2.21.0

payloadcms/payloadv2.21.0Jul 30, 2026by dsfaccini

AI Summary

Pydantic AI v2.21.0 adds granular control over usage limits with a new input token limit and fixes model name resolution from Gateway probes.

Key Highlights

  • Added `per_request_input_tokens_limit` to UsageLimits.
  • Fixed `KnownModelName` refresh logic from Gateway probes and Google image IDs.

New Features

  • Added `per_request_input_tokens_limit` to UsageLimits
  • Refresh `KnownModelName` from Gateway probes

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