返回全部动态

PydanticAI v2.32.1 发布:修复同步回调、Anthropic 签名及函数模型问题

原标题:v2.32.1 (2026-08-19)

PydanticAI Releases一手来源产品发布质量 69

AI 摘要

PydanticAI 发布了 v2.32.1 版本,主要包含三个 bug 修复:拒绝在 agent 运行中的同步回调里调用 run_sync(),避免向 Anthropic 发送空签名的 thinking 块,以及允许任意可调用对象作为 FunctionModel 的 function 或 stream_function。这些修复提升了框架的稳定性和兼容性。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🐛 Bug Fixes * Reject `Agent.run_sync()` from synchronous callbacks inside agent runs by @dsfaccini in https://github.com/pydantic/pydantic-ai/pull/7277 * Don't send Anthropic `thinking` blocks with an empty signature by @mpfaffenberger in https://github.com/pydantic/pydantic-ai/pull/7601 * Accept any callable as a `FunctionModel` `function` or `stream_function` by @dsfaccini in https://gith


发布时间:2026-08-20 10:11
抓取时间:2026-08-20 10:44
来源机构:Pydantic
阅读原文github.com