Pydantic-AI v2.23.0: Bedrock, Gemini, Cost Tracking, and Bug Fixes
Pydantic-AI version 2.23.0 introduces several new features, including Bedrock support for extra headers, stable Gateway aliases for Gemini models, and cost tracking capabilities. It also addresses multiple bug fixes related to Bedrock concurrency, Google Cloud credentials, and streaming response handling. This release is relevant for developers using Pydantic-AI for building AI applications across various providers.
- →Add Bedrock support for ModelSettings.extra_headers by @kkauy in https://github.com/pydantic/pydantic-ai/pull/4825
- →Add cost to RunUsage and cost_limit to UsageLimits by @Kludex in https://github.com/pydantic/pydantic-ai/pull/2684
- →Validate bedrock_max_concurrency instead of deadlocking on 0 by @LHMQ878 in https://github.com/pydantic/pydantic-ai/pull/6878
- →Fix GoogleCloudProvider credential scoping and ADC auth env-var leak by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/6500
- →Preserve capability container subclasses during binding by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/6677
Features (4) ›
- Add Bedrock support for ModelSettings.extra_headers by @kkauy in https://github.com/pydantic/pydantic-ai/pull/4825
Restore stable gemini-3-pro-image and gemini-3.1-flash-image Gateway aliases by @adtyavrdhn in https://github.com/pydantic/pydantic-ai/pull/7069
- Add cost to RunUsage and cost_limit to UsageLimits by @Kludex in https://github.com/pydantic/pydantic-ai/pull/2684
Add ToolAvailabilityDeltaPart with native tool_addition and additional_tools rendering by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6793
Fixes (8) ›
- Validate bedrock_max_concurrency instead of deadlocking on 0 by @LHMQ878 in https://github.com/pydantic/pydantic-ai/pull/6878
- Fix GoogleCloudProvider credential scoping and ADC auth env-var leak by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/6500
Read provider created timestamp from any chunk in OpenAI streaming responses by @LKRCharon in https://github.com/pydantic/pydantic-ai/pull/5496
- Preserve capability container subclasses during binding by @pydanty[bot] in https://github.com/pydantic/pydantic-ai/pull/6677
- Drop the bound on the Temporal payload TypeAdapter cache by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7085
Preserve the host's Pydantic AI instrumentation in the Temporal LogfirePlugin by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7086
- Fire capability event-stream and node hooks under agent.iter() by @DouweM in https://github.com/pydantic/pydantic-ai/pull/6871
- Close async streams on teardown instead of waiting for the garbage collector by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7095
https://github.com/pydantic/pydantic-ai/releases/tag/v2.23.0
Related releases
- Pydantic-AI v2.29.0 Adds Azure AI Voice Live Support and FastMCP 4 Pydantic AI Releases ·
- Pydantic-AI v1.107.4 Addresses High-Severity Web UI Vulnerability Pydantic AI Releases ·
- Pydantic AI v1.107.3 Patches High-Severity Web Chat UI Vulnerability Pydantic AI Releases ·
- Pydantic-AI v2.28.0 Patches High-Severity Security Flaw, Adds Realtime Speech-to-Speech Pydantic AI Releases ·
- crewAI 1.15.15 Release Adds AI Flow Reporting, Fixes Bugs CrewAI Releases ·
- LangGraph 1.2.11 Adds Trace Policy to Nodes, Updates Checkpoints LangGraph Releases ·