PydanticAI 发布 v2.49.0:新增 Copilot OAuth 与实时会话等待
原标题:v2.49.0 (2026-09-23)
AI 摘要
PydanticAI 发布 v2.49.0,新增 GitHubCopilotOAuthFlow 设备授权流程、BoolCriteria 布尔字段语义定义、RealtimeSession.wait_for_reply() 等特性,并改进 TypeSafeModel 对 None 与整数选项的处理。该版本还修复了 OpenAIChatModel 流式 logprobs 保留、Bedrock Converse 对 GPT-6 系列模型的支持、Google 图像生成与 Gemini Live 会话连接等多项问题。
正文节选
<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🚀 Features * Add `GitHubCopilotOAuthFlow` for device authorization by @Kludex in https://github.com/pydantic/pydantic-ai/pull/8618 * Add `BoolCriteria` to say what a `bool` field's yes and no mean, and let a `True`/`False` `Enum` do the same by @DouweM in https://github.com/pydantic/pydantic-ai/pull/8586 * Use what the user wrote about `None` as the "none of these" option in `TypeSafeModel`