# Pydantic AI v2.51.0 (2026-09-25)

Category: agent-infrastructure
Published: 2026-09-25T23:19:04Z
Source: [Pydantic AI releases](https://github.com/pydantic/pydantic-ai/releases/tag/v2.51.0)
Agent usefulness: 77/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-10-06T00:17:52.057Z
Tags: pydantic-ai, typed-agents, python

## Human Summary
Pydantic AI v2.51.0 introduces OpenAILiveModel support, context window tracking for realtime sessions, compatibility adjustments for Gemini Live and OpenAI/Azure/xAI tool choices, and multiple performance optimizations.

## Agent Summary
Pydantic AI v2.51.0 adds OpenAILiveModel and context window tracking for realtime sessions. Compatibility changes include raising UserError on forced realtime tool choices for OpenAI, Azure OpenAI, and xAI, handling dated gemini-3.8-live IDs, and raising RealtimeError on Gemini Live close codes. Core optimizations cache the agent graph during Agent.run() and eliminate redundant task groups.

## Body
Pydantic AI version 2.51.0 brings several realtime model updates and performance enhancements. Features include the addition of OpenAILiveModel for OpenAI GPT-Live support and exposure of context window usage on realtime sessions via reported ratios or response usage. Breaking/compatibility updates enforce UserError when attempting to force realtime tool choices on OpenAI, Azure OpenAI, and xAI, reject Google affective dialog on Gemini 3.1 Flash Live and 3.8 Live during connection, handle dated gemini-3.8-live IDs, and raise RealtimeError for Gemini Live close codes. Bug fixes and performance improvements include caching the agent graph across Agent.run() calls, avoiding task groups for single-child toolset fan-outs, buffering text deltas during CompletedStreamedResponse replays, and preserving provider details on truncated or completed OpenAI Realtime tool-call responses.

## Recommended actions
- Verify realtime tool choice configurations to avoid UserError if previously forcing tool calls on OpenAI, Azure OpenAI, or xAI.
- Update Gemini Live integrations to handle RealtimeError on close codes and remove affective dialog usage on Gemini 3.1 Flash Live and 3.8 Live.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.