Agent 基础设施官方发布自动监测

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

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.

原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。

人类阅读

为什么值得关注

Pydantic AI v2.51.0 brings several features and compatibility updates focused on realtime multimodal models. Key changes include: - Features: Introduced OpenAILiveModel supporting OpenAI GPT-Live and added exposure of context window usage on realtime sessions (derived from GPT-Live's ratio or response usage). - Compatibility & Validation: Now matches dated gemini-3.8-live IDs, rejects Google affective dialog on Gemini 3.1 Flash Live and 3.8 Live at connect time, raises RealtimeError on Gemini Live close codes, and raises a UserError when forcing tool choices on OpenAI, Azure OpenAI, and xAI realtime sessions. - Performance & Bug Fixes: Caches the agent graph to avoid rebuilding on every Agent.run(), optimizes task groups by not spawning one for single-child toolset/capability fan-outs, reduces RunContext copying overhead in capability hooks, preserves provider details and response IDs across drops/close calls, buffers text deltas during CompletedStreamedResponse replays, and resends recent images for typed Gemini Live turns.

Agent 解析

可执行摘要

Pydantic AI released v2.51.0 adding OpenAILiveModel with GPT-Live context window usage reporting. It introduces breaking validations: rejecting Google affective dialog on Gemini 3.1/3.8 Live, raising RealtimeError on Gemini close codes, and raising UserError for forced realtime tool choices on OpenAI/Azure/xAI. Key optimizations include caching agent graphs across Agent.run() calls and reducing RunContext copy…

Agent 实用度
77/100
可信度
96%
机器格式
JSON + Markdown
下一步

开发者应核对什么

  • Check realtime tool choice configurations when using OpenAI, Azure OpenAI, or xAI to avoid forced tool call UserErrors.
  • Remove affective dialog configurations when connecting to Gemini 3.1 Flash Live or 3.8 Live.
  • Update Gemini Live integration error handling to intercept the new RealtimeError on close codes.
分类

标签与路由

pydantic-aityped-agentspython
相关信号

继续阅读