mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-21 05:40:51 +08:00
The OpenAI Chat Completions translator was silently dropping response.function_call_arguments.delta and response.function_call_arguments.done Codex SSE events, meaning tool call arguments were never streamed incrementally to clients. Add proper handling mirroring the proven Claude translator pattern: - response.output_item.added: announce tool call (id, name, empty args) - response.function_call_arguments.delta: stream argument chunks - response.function_call_arguments.done: emit full args if no deltas - response.output_item.done: defensive fallback for backward compat State tracking via HasReceivedArgumentsDelta and HasToolCallAnnounced ensures no duplicate argument emission and correct behavior for models like codex-spark that skip delta events entirely.