anomalyco / anomalyco/opencode
[Bug] OpenCode Go gpt-5.6-luna buffers Responses output into a single late delta
@MrMushrooooom is already working on this.
Since Aug 8, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
gpt-5.6-luna on OpenCode Go buffers the generated text and emits it as one large response.output_text.delta near the end of a Responses API stream. This prevents clients from showing incremental output even though stream: true is used.
In one instrumented request, response headers arrived after 1.65 s and small keepalive chunks continued arriving for about 17.5 s. However, no Responses API data event was emitted until 19.17 s. The only text delta arrived at 19.42 s and contained the entire 3,502-character structured response. response.completed followed at 20.00 s.
Sanitized timeline:
+1.651s HTTP 200, content-type: text/event-stream
+1.773s to +19.086s periodic 14-byte keepalive chunks
+19.173s response.created
+19.218s response.in_progress
+19.221s response.output_item.added
+19.232s response.content_part.added
+19.418s response.output_text.delta (delta length: 3502; only delta)
+19.714s response.output_text.done
+19.840s response.output_item.done
+20.003s response.completed
The keepalive chunks prove that the HTTP connection itself is streaming; the actual model output appears to be buffered by the Go gateway or its Luna upstream route.
As a control, deepseek-v4-flash on OpenCode Go streams normally in the same application. It uses the Chat Completions protocol rather than the Responses protocol, but it returns multiple intermediate choices[].delta.content chunks during generation, and the UI updates incrementally.
This is related to but distinct from #40420: that issue concerns missing terminal finish_reason / [DONE] behavior on Chat Completions, while this report concerns Responses API text being emitted as one late, full-size delta.
Plugins
N/A. This was reproduced through the hosted OpenCode Go API from a custom application using AI SDK 7.0.48 and @ai-sdk/openai 4.0.27.
OpenCode version
N/A. The issue is against the hosted OpenCode Go gateway.
Steps to reproduce
- Send a streaming structured-output request to
POST https://opencode.ai/zen/go/v1/responseswithmodel: gpt-5.6-luna,stream: true, andtext.format.type: json_schema. - Record the timestamp and type of every SSE event without logging response content.
- Observe keepalive traffic during generation, followed by one large
response.output_text.deltacontaining the complete result shortly beforeresponse.completed.
Expected behavior: emit multiple response.output_text.delta events throughout generation so clients can render partial output.
Screenshot and/or share link
No screenshot. The sanitized event timeline is included above; no prompt or generated content was recorded.
Operating System
Ubuntu Linux
Terminal
zsh
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.