# Pitfall Log / 踩坑日志

项目：pydantic/pydantic-ai

摘要：发现 28 个潜在踩坑项，其中 5 个为 high/blocking；最高优先级：安装坑 - 来源证据：xAI: update docs and `KnownModelName` for current Grok 4.3 / 4.20 model names。

## 1. 安装坑 · 来源证据：xAI: update docs and `KnownModelName` for current Grok 4.3 / 4.20 model names

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：xAI: update docs and `KnownModelName` for current Grok 4.3 / 4.20 model names
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_fecdaf4224b646929420b15d99f2a933 | https://github.com/pydantic/pydantic-ai/issues/5663 | 来源类型 github_issue 暴露的待验证使用条件。

## 2. 配置坑 · 来源证据：[roundtrip-sweep] ModelRequest.parts: InstructionPart fails to deserialize after serialization

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：[roundtrip-sweep] ModelRequest.parts: InstructionPart fails to deserialize after serialization
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_d3718c4d2db24bceabf8d4e935091eec | https://github.com/pydantic/pydantic-ai/issues/5696 | 来源讨论提到 python 相关条件，需在安装/试用前复核。

## 3. 配置坑 · 来源证据：[streaming-resilience-sweep] Streaming: `stream_output()` doesn't set `is_complete=True` on early break

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：[streaming-resilience-sweep] Streaming: `stream_output()` doesn't set `is_complete=True` on early break
- 对用户的影响：可能影响升级、迁移或版本选择。
- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_9c38896c20d24789beb9604c4d4f2626 | https://github.com/pydantic/pydantic-ai/issues/5615 | 来源讨论提到 python 相关条件，需在安装/试用前复核。

## 4. 安全/权限坑 · 来源证据：[aw] No-Op Runs

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[aw] No-Op Runs
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_0ba5cb74938c4ad5aaddfd0fced08630 | https://github.com/pydantic/pydantic-ai/issues/5685 | 来源类型 github_issue 暴露的待验证使用条件。

## 5. 安全/权限坑 · 来源证据：`MCPToolset(url, http_client=...)` crashes: factory missing `follow_redirects` kwarg passed by `FastMCP`

- 严重度：high
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：`MCPToolset(url, http_client=...)` crashes: factory missing `follow_redirects` kwarg passed by `FastMCP`
- 对用户的影响：可能阻塞安装或首次运行。
- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。
- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_30f08a19e50a4708b984022031c55054 | https://github.com/pydantic/pydantic-ai/issues/5688 | 来源讨论提到 python 相关条件，需在安装/试用前复核。

## 6. 安装坑 · 失败模式：installation: v2.0.0b1 (2026-05-20)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this installation risk before relying on the project: v2.0.0b1 (2026-05-20)
- 对用户的影响：Upgrade or migration may change expected behavior: v2.0.0b1 (2026-05-20)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v2.0.0b1 (2026-05-20). Context: Observed when using python
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_6565701c26f03fa2f9360df9e9925984 | https://github.com/pydantic/pydantic-ai/releases/tag/v2.0.0b1 | v2.0.0b1 (2026-05-20)

## 7. 配置坑 · 失败模式：configuration: [aw] No-Op Runs

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: [aw] No-Op Runs
- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: [aw] No-Op Runs
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [aw] No-Op Runs. Context: Source discussion did not expose a precise runtime context.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_issue | fmev_630176c03d70150693f25efc4e776f66 | https://github.com/pydantic/pydantic-ai/issues/5685 | [aw] No-Op Runs

## 8. 配置坑 · 失败模式：configuration: `MCPToolset(url, http_client=...)` crashes: factory missing `follow_redirects` kwarg passed b...

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: `MCPToolset(url, http_client=...)` crashes: factory missing `follow_redirects` kwarg passed by `FastMCP`
- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: `MCPToolset(url, http_client=...)` crashes: factory missing `follow_redirects` kwarg passed by `FastMCP`
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: `MCPToolset(url, http_client=...)` crashes: factory missing `follow_redirects` kwarg passed by `FastMCP`. Context: Observed when using python
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_issue | fmev_1c1bcf0774a223c19b0054f060350857 | https://github.com/pydantic/pydantic-ai/issues/5688 | `MCPToolset(url, http_client=...)` crashes: factory missing `follow_redirects` kwarg passed by `FastMCP`

## 9. 配置坑 · 失败模式：configuration: v1.100.0 (2026-05-20)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v1.100.0 (2026-05-20)
- 对用户的影响：Upgrade or migration may change expected behavior: v1.100.0 (2026-05-20)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.100.0 (2026-05-20). Context: Source discussion did not expose a precise runtime context.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_1118f6639392629ef5022ee4c6f40741 | https://github.com/pydantic/pydantic-ai/releases/tag/v1.100.0 | v1.100.0 (2026-05-20)

## 10. 配置坑 · 失败模式：configuration: v1.101.0 (2026-05-21)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v1.101.0 (2026-05-21)
- 对用户的影响：Upgrade or migration may change expected behavior: v1.101.0 (2026-05-21)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.101.0 (2026-05-21). Context: Source discussion did not expose a precise runtime context.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_e0130422b62adb912b0bfab8a362a2c7 | https://github.com/pydantic/pydantic-ai/releases/tag/v1.101.0 | v1.101.0 (2026-05-21)

## 11. 配置坑 · 失败模式：configuration: v1.102.0 (2026-05-22)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v1.102.0 (2026-05-22)
- 对用户的影响：Upgrade or migration may change expected behavior: v1.102.0 (2026-05-22)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.102.0 (2026-05-22). Context: Observed when using docker
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_b0bf5413bd949884bdbfa3f220d92c63 | https://github.com/pydantic/pydantic-ai/releases/tag/v1.102.0 | v1.102.0 (2026-05-22)

## 12. 配置坑 · 失败模式：configuration: v1.103.0 (2026-05-26)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v1.103.0 (2026-05-26)
- 对用户的影响：Upgrade or migration may change expected behavior: v1.103.0 (2026-05-26)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.103.0 (2026-05-26). Context: Source discussion did not expose a precise runtime context.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_456a570a5fe6acd24fe482fbb09c7712 | https://github.com/pydantic/pydantic-ai/releases/tag/v1.103.0 | v1.103.0 (2026-05-26)

## 13. 配置坑 · 失败模式：configuration: v1.97.0 (2026-05-15)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v1.97.0 (2026-05-15)
- 对用户的影响：Upgrade or migration may change expected behavior: v1.97.0 (2026-05-15)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.97.0 (2026-05-15). Context: Source discussion did not expose a precise runtime context.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_bda659bd6f6abef62eebb2e078e947e4 | https://github.com/pydantic/pydantic-ai/releases/tag/v1.97.0 | v1.97.0 (2026-05-15)

## 14. 配置坑 · 失败模式：configuration: v1.98.0 (2026-05-18)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v1.98.0 (2026-05-18)
- 对用户的影响：Upgrade or migration may change expected behavior: v1.98.0 (2026-05-18)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.98.0 (2026-05-18). Context: Source discussion did not expose a precise runtime context.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_9e2147dc09e31b5971fdce0f207206ce | https://github.com/pydantic/pydantic-ai/releases/tag/v1.98.0 | v1.98.0 (2026-05-18)

## 15. 配置坑 · 失败模式：configuration: v1.99.0 (2026-05-19)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v1.99.0 (2026-05-19)
- 对用户的影响：Upgrade or migration may change expected behavior: v1.99.0 (2026-05-19)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.99.0 (2026-05-19). Context: Source discussion did not expose a precise runtime context.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_4b34c5a62f3a45510cd8771cdc290541 | https://github.com/pydantic/pydantic-ai/releases/tag/v1.99.0 | v1.99.0 (2026-05-19)

## 16. 配置坑 · 失败模式：configuration: v2.0.0b2 (2026-05-21)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v2.0.0b2 (2026-05-21)
- 对用户的影响：Upgrade or migration may change expected behavior: v2.0.0b2 (2026-05-21)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v2.0.0b2 (2026-05-21). Context: Observed during version upgrade or migration.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_6abb491a15959bb1e4d61d65b1fa1fc5 | https://github.com/pydantic/pydantic-ai/releases/tag/v2.0.0b2 | v2.0.0b2 (2026-05-21)

## 17. 配置坑 · 失败模式：configuration: v2.0.0b3 (2026-05-22)

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this configuration risk before relying on the project: v2.0.0b3 (2026-05-22)
- 对用户的影响：Upgrade or migration may change expected behavior: v2.0.0b3 (2026-05-22)
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v2.0.0b3 (2026-05-22). Context: Observed when using docker
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_release | fmev_fb412a6f85fcf1e09bcb80f252ace91b | https://github.com/pydantic/pydantic-ai/releases/tag/v2.0.0b3 | v2.0.0b3 (2026-05-22)

## 18. 配置坑 · 来源证据：Bedrock filters the tools array client-side when `tool_choice` forces a specific tool

- 严重度：medium
- 证据强度：source_linked
- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Bedrock filters the tools array client-side when `tool_choice` forces a specific tool
- 对用户的影响：可能增加新用户试用和生产接入成本。
- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。
- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。
- 证据：community_evidence:github | cevd_f22814f2cf5c4d8ca2ef9ebb13f90d1a | https://github.com/pydantic/pydantic-ai/issues/5672 | 来源讨论提到 python 相关条件，需在安装/试用前复核。

## 19. 能力坑 · 能力判断依赖假设

- 严重度：medium
- 证据强度：source_linked
- 发现：README/documentation is current enough for a first validation pass.
- 对用户的影响：假设不成立时，用户拿不到承诺的能力。
- 建议检查：将假设转成下游验证清单。
- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。
- 证据：capability.assumptions | github_repo:818331198 | https://github.com/pydantic/pydantic-ai | README/documentation is current enough for a first validation pass.

## 20. 运行坑 · 失败模式：runtime: Bedrock filters the tools array client-side when `tool_choice` forces a specific tool

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this runtime risk before relying on the project: Bedrock filters the tools array client-side when `tool_choice` forces a specific tool
- 对用户的影响：Developers may hit a documented source-backed failure mode: Bedrock filters the tools array client-side when `tool_choice` forces a specific tool
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Bedrock filters the tools array client-side when `tool_choice` forces a specific tool. Context: Observed when using python
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_issue | fmev_9b1d8efd612da12698cf0bce2b4fe90a | https://github.com/pydantic/pydantic-ai/issues/5672 | Bedrock filters the tools array client-side when `tool_choice` forces a specific tool

## 21. 运行坑 · 失败模式：runtime: [roundtrip-sweep] ModelRequest.parts: InstructionPart fails to deserialize after serialization

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this runtime risk before relying on the project: [roundtrip-sweep] ModelRequest.parts: InstructionPart fails to deserialize after serialization
- 对用户的影响：Developers may hit a documented source-backed failure mode: [roundtrip-sweep] ModelRequest.parts: InstructionPart fails to deserialize after serialization
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [roundtrip-sweep] ModelRequest.parts: InstructionPart fails to deserialize after serialization. Context: Observed when using python
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_issue | fmev_4de8756ccb3f4c9da999d386da5a424d | https://github.com/pydantic/pydantic-ai/issues/5696 | [roundtrip-sweep] ModelRequest.parts: InstructionPart fails to deserialize after serialization

## 22. 运行坑 · 失败模式：runtime: xAI: update docs and `KnownModelName` for current Grok 4.3 / 4.20 model names

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this runtime risk before relying on the project: xAI: update docs and `KnownModelName` for current Grok 4.3 / 4.20 model names
- 对用户的影响：Developers may hit a documented source-backed failure mode: xAI: update docs and `KnownModelName` for current Grok 4.3 / 4.20 model names
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: xAI: update docs and `KnownModelName` for current Grok 4.3 / 4.20 model names. Context: Source discussion did not expose a precise runtime context.
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_issue | fmev_d0614ea67add2229d31197804c260ad5 | https://github.com/pydantic/pydantic-ai/issues/5663 | xAI: update docs and `KnownModelName` for current Grok 4.3 / 4.20 model names

## 23. 维护坑 · 失败模式：migration: [streaming-resilience-sweep] Streaming: `stream_output()` doesn't set `is_complete=True` on e...

- 严重度：medium
- 证据强度：source_linked
- 发现：Developers should check this migration risk before relying on the project: [streaming-resilience-sweep] Streaming: `stream_output()` doesn't set `is_complete=True` on early break
- 对用户的影响：Developers may hit a documented source-backed failure mode: [streaming-resilience-sweep] Streaming: `stream_output()` doesn't set `is_complete=True` on early break
- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [streaming-resilience-sweep] Streaming: `stream_output()` doesn't set `is_complete=True` on early break. Context: Observed when using python
- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.
- 证据：failure_mode_cluster:github_issue | fmev_7696a9ea598f5f10b04013bbc7385aa3 | https://github.com/pydantic/pydantic-ai/issues/5615 | [streaming-resilience-sweep] Streaming: `stream_output()` doesn't set `is_complete=True` on early break

## 24. 维护坑 · 维护活跃度未知

- 严重度：medium
- 证据强度：source_linked
- 发现：未记录 last_activity_observed。
- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。
- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。
- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。
- 证据：evidence.maintainer_signals | github_repo:818331198 | https://github.com/pydantic/pydantic-ai | last_activity_observed missing

## 25. 安全/权限坑 · 下游验证发现风险项

- 严重度：medium
- 证据强度：source_linked
- 发现：no_demo
- 对用户的影响：下游已经要求复核，不能在页面中弱化。
- 建议检查：进入安全/权限治理复核队列。
- 防护动作：下游风险存在时必须保持 review/recommendation 降级。
- 证据：downstream_validation.risk_items | github_repo:818331198 | https://github.com/pydantic/pydantic-ai | no_demo; severity=medium

## 26. 安全/权限坑 · 存在评分风险

- 严重度：medium
- 证据强度：source_linked
- 发现：no_demo
- 对用户的影响：风险会影响是否适合普通用户安装。
- 建议检查：把风险写入边界卡，并确认是否需要人工复核。
- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。
- 证据：risks.scoring_risks | github_repo:818331198 | https://github.com/pydantic/pydantic-ai | no_demo; severity=medium

## 27. 维护坑 · issue/PR 响应质量未知

- 严重度：low
- 证据强度：source_linked
- 发现：issue_or_pr_quality=unknown。
- 对用户的影响：用户无法判断遇到问题后是否有人维护。
- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。
- 防护动作：issue/PR 响应未知时，必须提示维护风险。
- 证据：evidence.maintainer_signals | github_repo:818331198 | https://github.com/pydantic/pydantic-ai | issue_or_pr_quality=unknown

## 28. 维护坑 · 发布节奏不明确

- 严重度：low
- 证据强度：source_linked
- 发现：release_recency=unknown。
- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。
- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。
- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。
- 证据：evidence.maintainer_signals | github_repo:818331198 | https://github.com/pydantic/pydantic-ai | release_recency=unknown
