调试工作流
当客户端请求失败、路由到错误 provider、返回 shape 不符合预期,或流式卡住时,使用这个工作流。
- 1读取客户端错误保留 HTTP status、payload type,以及问题发生在 stream 前还是 stream 中。
- 2分类层级区分客户端请求、路由、provider auth、上游状态、translation 和 streaming semantics。
- 3检查日志开启 captures 前,先看结构化日志和 request hints。
- 4捕获一个 phase选择能回答问题的最窄 capture phase。
- 5对比预期与实际对比 inbound request、provider request、upstream response 或 outbound response。
- 6关闭并脱敏关闭 capture,分享前对产物脱敏。
| 症状 | 可能层级 | 有用 phase |
|---|---|---|
| 客户端请求立刻被拒绝 | 入站请求校验 | inbound_request |
| 选中了错误 provider | Routing / config | inbound_request 和 logs |
| 上游返回 401 / 403 | Provider auth | provider_request 加 upstream status |
| Provider 返回意外 JSON | 上游响应 shape | upstream_response |
| 客户端收到错误协议 shape | Translation / outbound reconstruction | outbound_response |
| 工具参数开始后 stream 卡住 | Streaming semantics | stream logs 和 tool-call timeout |
Capture 命令
Section titled “Capture 命令”proxai capture enable provider-request# reproduce onceproxai capture disable provider-requestPhase 名称和隐私风险见捕获阶段。
提 issue 前
Section titled “提 issue 前”- 包含 ProxAI version 和 OS。
- 包含 inbound endpoint 和 model name。
- 包含选中的 provider protocol,不包含 provider API key。
- 优先提供脱敏 capture 或最小 synthetic payload。
- 不要包含
Authorization、api_key、私有 prompts、私有 outputs 或包含 secret 的完整上游 URL。