python Pydantic AI Releases · · 2.21.0

pydantic-ai v2.21.0 adds token limit and refreshes model names

sdkaiengineerpython-agentic
feature patch

Pydantic-ai v2.21.0 introduces a `per_request_input_tokens_limit` parameter to `UsageLimits`, allowing finer control over request processing. The release also includes a bug fix to refresh `KnownModelName` using Gateway probes and stable Google image IDs. These updates are now available and primarily benefit developers building AI applications with pydantic-ai.

  • feat(usage): add per_request_input_tokens_limit to UsageLimits by @Oxygen56 in https://github.com/pydantic/pydantic-ai/pull/5907
  • Refresh KnownModelName from Gateway probes and stable Google image IDs by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6806
Features (1)
  • feat(usage): add per_request_input_tokens_limit to UsageLimits by @Oxygen56 in https://github.com/pydantic/pydantic-ai/pull/5907
Fixes (1)
  • Refresh KnownModelName from Gateway probes and stable Google image IDs by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/6806
Read the original announcement →

https://github.com/pydantic/pydantic-ai/releases/tag/v2.21.0

Related releases