Summary
The Go service advertises POST /v1/responses and returns valid JSON for non-streaming requests, but streaming responses emit an incomplete SSE event sequence. The stream is missing the response.output_item.added and response.content_part.added events that OpenAI Responses-API clients (e.g. the Codex CLI) rely on to parse output incrementally. In practice the client only receives response.output_text.delta → response.completed → [DONE], which does not constitute a valid Responses-API stream.
Reproduction
- Point the Codex CLI at the Go service (in
~/.codex/config.toml):
base_url = https://opencode.ai/zen/go/v1
wire_api = responses
- model:
deepseek-v4-flash
- Run any prompt. Codex fails to parse the stream and the turn errors out or hangs.
- Raw SSE captured from
POST /v1/responses with "stream": true:
event: response.output_text.delta
data: {"type":"response.output_text.delta","delta":"ok",...}
event: response.completed
data: {"type":"response.completed","response":{...}}
data: [DONE]
event: ping
data: {"type":"ping","cost":"0"}
Note the absence of response.created, response.in_progress, response.output_item.added, response.content_part.added, and response.output_item.done.
Expected behavior
A standard Responses-API SSE stream:
event: response.created
event: response.in_progress
event: response.output_item.added (message item)
event: response.content_part.added (output_text part)
event: response.output_text.delta ...
event: response.output_item.done
event: response.completed
Impact
- Non-streaming
POST /v1/responses returns a complete object and works via curl.
- Streaming is what Codex-style clients actually use; with the current event set they cannot render or complete a turn.
Related
Summary
The Go service advertises
POST /v1/responsesand returns valid JSON for non-streaming requests, but streaming responses emit an incomplete SSE event sequence. The stream is missing theresponse.output_item.addedandresponse.content_part.addedevents that OpenAI Responses-API clients (e.g. the Codex CLI) rely on to parse output incrementally. In practice the client only receivesresponse.output_text.delta→response.completed→[DONE], which does not constitute a valid Responses-API stream.Reproduction
~/.codex/config.toml):base_url = https://opencode.ai/zen/go/v1wire_api = responsesdeepseek-v4-flashPOST /v1/responseswith"stream": true:Note the absence of
response.created,response.in_progress,response.output_item.added,response.content_part.added, andresponse.output_item.done.Expected behavior
A standard Responses-API SSE stream:
Impact
POST /v1/responsesreturns a complete object and works via curl.Related
feat(core): support response-shaped catalog models) appears to be the fix in progress, but has not been merged yet.