Skip to content

[BUG] Go service /v1/responses returns HTTP 200 but emits an incomplete SSE event stream, breaking Codex-style clients #40171

Description

@YiRan0

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.deltaresponse.completed[DONE], which does not constitute a valid Responses-API stream.

Reproduction

  1. 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
  2. Run any prompt. Codex fails to parse the stream and the turn errors out or hangs.
  3. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions