跳转到内容

流式与工具调用

当纯文本 streaming 正常,但涉及工具时失败、卡住或返回意外事件,看本页。

入站协议预期终止信号
openai_responsesresponse.completed 或兼容的 Responses terminal event
openai_chat_completionsdata: [DONE]
anthropic_messagesmessage_stop
  1. 1确认是否有字节到达如果没有字节到达,检查 provider 连通性和 read_idle_timeout_secs。
  2. 2检查工具参数是否已经开始如果 argument chunks 已开始但永远不完成,这是语义性 tool-call stall。
  3. 3检查 tool_calls timeout为不完整流式工具参数调整 [tool_calls].timeout_secs。
  4. 4窄范围 capture只对一次脱敏复现使用 provider_request 或 upstream_response。
  5. 5对比终止事件确认 provider 发出了其协议预期的 terminal event。
设置层级含义
[providers.<name>].read_idle_timeout_secsTransport carrier等待上游字节时允许的最大 idle gap。
[tool_calls].timeout_secsProtocol semantics工具参数开始后,等待不完整流式工具参数的最长时间。
问题Capture phase
ProxAI 是否向上游发送了预期工具 schema?provider_request
Provider 是否发出了 tool-call argument chunks?upstream_response
客户端是否收到了预期翻译后的 chunks?outbound_response

复现一次后始终关闭 capture。见捕获阶段