Files
CLIProxyAPI/internal
辰ing 07455ecba7 fix(translator): 上游流式 tool_calls 缺少 id 时合成 call_id 保证事件链完整
部分 OpenAI 兼容上游(自建 vLLM/sglang、部分中转网关)在流式 delta 中
不携带 tool_calls[].id。原逻辑要求非空 id 才发出
response.output_item.added/done 事件链,导致 Codex 侧完全收不到
函数调用(表现为工具全部不可用)。非流式路径同样产出 call_id 为空
的残缺 item。

缺失 id 时按 call_<responseID>_<choiceIdx>_<toolIndex> 合成确定性
call_id;chat completions 上游无状态,call_id 仅需单请求内自洽,
合成 id 可安全往返。

Ref #4219
2026-07-12 20:39:54 +08:00
..