Pydantic AI Updates: September 26, 2026
1. v2.51.0 Adds OpenAI GPT-Live Support Through OpenAILiveModel
Pydantic AI shipped v2.51.0 with a new OpenAILiveModel that brings OpenAI’s GPT-Live into its realtime session API. Realtime sessions also now expose context_window_used, taken from GPT-Live’s reported ratio or from response usage, so callers can see how close a long-running voice or streaming session is to its context limit. Source
2. Stricter Realtime Validation for Gemini Live and Forced Tool Calls
Pydantic AI flagged two compatibility changes in v2.51.0. Dated gemini-3.8-live model IDs are now matched, google_affective_dialog is rejected at connect time on Gemini 3.1 Flash Live and 3.8 Live, and Gemini Live close codes now raise RealtimeError. A realtime tool_choice that forces a tool call on OpenAI, Azure OpenAI, or xAI now raises a UserError instead of failing later. Source
3. Agent Runs Get Cheaper by Caching the Agent Graph
Pydantic AI v2.51.0 caches the agent graph instead of rebuilding it on every Agent.run(), reduces RunContext copying overhead in capability hooks, and stops spawning a task group when a toolset or capability fan-out has only one child. For services that run many short agent calls, these cut per-run overhead without any code changes. Source