mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-06 08:06:50 +00:00
When a non-streaming /v1/responses request is aggregated from upstream SSE and the stream ends with response.incomplete (e.g. max_output_tokens) or response.cancelled instead of response.completed, the SSE-to-JSON handlers fell back to relaying the raw SSE body. Use the terminal event's response object as the final JSON (keeping status/incomplete_details) in both handlePassthroughSSEToJSON and handleSSEToJSON. Usage is still recorded. extractCodexFinalResponse is unchanged. Refs #7978