PydanticAI v2.64.0 发布:新增模型回退与安全扫描
原标题:v2.64.0 (2026-10-30)
AI 摘要
PydanticAI 发布 v2.64.0,新增 ModelFallback 能力、按尝试执行的 prepare_model_request 钩子与 RetryModelRequest,使模型请求失败时可自动回退。该版本还加入 ArtifactScanner 对 Memory 和 Skills 进行安全扫描、BoxdSandbox 沙箱工作区,以及实时语音词级时间戳等能力。同时调整了 Coder 的严格工具 schema 默认值,并将 json-repair 改为可选依赖。
正文节选
<!-- Release notes generated using configuration in .github/release.yml at cde1d10f88ce6d0ab4743e226d51a9ac65810f50 --> ## What's Changed ### ⚠️ Compatibility Notes * Raise an error status a retrying transport gave up on as `ModelHTTPError`, so fallback moves on by @DouweM in https://github.com/pydantic/pydantic-ai/pull/11934 * Send stored response, item, conversation and container IDs back only to the endpoint that created them, via `Model.accepts_server_state` by @DouweM in https://github.com