Repository navigation
Description
Description
gpt-5.6-luna on OpenCode Go is reachable and returns completions, but the stream/output quality is degraded compared to the same model via OpenAI Codex.
Observed symptoms on OpenCode Go (opencode-go / gpt-5.6-luna):
- Repeated final answers — exact phrase echoed multiple times in one completion
- Mid-stream cut / continue loops — client sees network-cut continuation behavior (
previous response was cut off by a network error mid-stream) even on short prompts - Garbage / wrong identity tails — after a finished answer, extra junk text appears (e.g. model claiming to be a different model, trailing “Fine.” / completion noise)
- Control/count tasks get polluted — e.g. “count 1..5” returns the numbers plus an unnecessary trailing remark
Same model ID via OpenAI Codex (openai-codex / gpt-5.6-luna) on the same machine/day is clean: single exact answer, no repetition, no junk tail.
This looks like a Go relay / Responses streaming issue for Luna, not a general Luna model failure.
Related (not identical):
- Zen: gpt-5.6-luna / gpt-5.6-terra fail with "Error from provider (Console): Upstream request failed" #39831 — Zen/Go Luna/Terra hard-fail with
Upstream request failed/Error from provider (Console Go) - Our case is softer: requests often succeed, but stream integrity / final text quality is bad
Docs reference
Per https://opencode.ai/docs/go , GPT 5.6 Luna is served on:
- Model ID:
gpt-5.6-luna - Endpoint:
https://opencode.ai/zen/go/v1/responses - Package:
@ai-sdk/openai
Plugins
N/A (reproduced via OpenAI-compatible client / Hermes Agent using OpenCode Go API key against the public Go endpoint). Not using OpenCode TUI plugins.
OpenCode version
N/A for TUI — reproduced against the public Go API:
- Base URL:
https://opencode.ai/zen/go/v1 - Provider label: OpenCode Go
- Model:
gpt-5.6-luna
Client side: Hermes Agent using the OpenCode Go key / Responses path for Luna.
Steps to reproduce
- Authenticate with a valid OpenCode Go API key.
- Call Luna on Go (Responses path as documented):
POST https://opencode.ai/zen/go/v1/responses- model:
gpt-5.6-luna
- Minimal prompts that reproduced degradation today (2026-07-31, Europe/Rome):
Reply with exactly: LUNA_OK_OPENCODE
Observed: answer repeated multiple times (LUNA_OK_OPENCODE × N), plus mid-stream continue behavior in the client session log.
In Italian, one line only: say who you are and your model id if known. No repetitions.
Observed on Go: wrong/noisy identity text (including claiming another model) and trailing junk.
Count from 1 to 5, one number per line, nothing else.
Observed on Go:
1
2
3
4
5(The count was already complete.)
- Control comparison on the same day, same machine, same model ID via OpenAI Codex:
- Prompt:
Reply with exactly: LUNA_OK_CODEX - Result: clean single-line
LUNA_OK_CODEX - Natural one-line identity prompt: clean, correct, no junk
- Prompt:
Expected behavior
- Single clean final answer
- No repeated completion text
- No mid-stream cut/continue loops on short prompts
- No trailing garbage after a finished response
- Behavior parity with Codex for the same model ID on simple deterministic prompts
Actual behavior
On OpenCode Go, Luna often returns usable tokens but with degraded stream/finalization quality (repetitions, cut/continue, junk tails, wrong identity noise). Codex path remains clean.
Screenshot and/or share link
No TUI screenshot. Session evidence from 2026-07-31 CEST:
- Go smoke: repeated
LUNA_OK_OPENCODE - Go natural prompt: polluted/wrong identity + trailing noise
- Go count prompt: numbers + trailing remark after completion
- Codex control: clean exact responses
Happy to provide redacted request/response traces (no API keys) if useful.
Operating System
Linux (server-side client against public Go API), Europe/Rome
Terminal
Headless API client (Hermes Agent CLI), not OpenCode TUI
Additional notes
- UI label
(2x)on GPT 5.6 Luna in some clients appears to be the temporary 2× usage limits promo, not a separate model SKU. This report is about quality/stream integrity ofgpt-5.6-lunaon Go, not quota labeling. - Antigravity/OpenCode TUI usage of Luna may appear “fine” depending on transport/path; the degradation was consistently reproducible through the Go API Responses path from an external agent client.
- Please advise if Go Luna currently requires a specific Responses contract (stream flags,
previous_response_id, WS vs SSE, etc.) that third-party clients must mirror.
Activity
awesomekyle commentedon Jul 31, 2026
Is your stream cut off mid-stream, or is it just missing a stop reason? When using pi, it tells me this:
Error: Retry failed after 3 attempts: Stream ended without finish_reason. Looking at the raw stream it looks like it actually is done, it has token usage, but no[DONE]and nofinish_reason. These are the last events in the SSE stream:kirocop commentedon Jul 31, 2026
@awesomekyle Good catch — this matches what we see.
Short answer: it looks more like a missing/nonstandard stream termination than a clean mid-generation cut.
We just rechecked both Go endpoints with the same minimal prompt:
Reply with exactly: LUNA_SSE_TEST1) Documented path:
POST /zen/go/v1/responses(stream=true)This path looks healthier:
LUNA_SSE_TESTresponse.output_text.done→response.output_item.done→response.completedstatus: "completed"No classic chat-completions
finish_reason/[DONE]here (expected for Responses API).2) Compatibility path:
POST /zen/go/v1/chat/completions(stream=true)This is the broken-looking one, and it matches your raw trace closely:
LUNA_SSE_TEST)choices: []data: [DONE]finish_reason: "stop"finish_reasonvalues seen on content deltas arenullLast events look like:
So: stream has tokens + usage, but clients that require either
[DONE]or a non-nullfinish_reasonwill treat it as incomplete and retry (Stream ended without finish_reason).How this maps to our original report
Our agent client hits the incomplete-stream recovery path (“previous response was cut off… continue”), which then produces:
So the user-visible degradation is likely a client retry/continue reaction to malformed chat-completions SSE termination on Go Luna, not only model quality.
Ask for maintainers
Is Go’s
/chat/completionsstream forgpt-5.6-lunaintentionally nonstandard, or should it emit a normal OpenAI-compatible terminator (finish_reason: "stop"and/ordata: [DONE])?If
/responsesis the supported path for Luna, it would help to call that out more strongly for third-party clients — docs already list Responses for Luna, but many agents still default to chat-completions.Happy to provide additional redacted SSE captures if useful.
kirocop commentedon Jul 31, 2026
Additional data point: the missing termination is not limited to SSE streaming — it reproduces in plain non-stream requests too.
Tested both endpoints with the same minimal prompt (
Reply with exactly: LUNA_OK), non-stream:1) POST /zen/go/v1/responses
status: "completed"LUNA_OK2) POST /zen/go/v1/chat/completions
content: "LUNA_OK"finish_reason: null(nostopeven on a fully completed response)So on the compatibility path the model produces the full answer but never emits a terminal
finish_reason, which forces clients to treat every response as incomplete and retry. This aligns with the streaming trace above (no[DONE], final usage chunk only) and confirms the issue is in the chat/completions transport itself, not in stream handling.jcmpgit commentedon Aug 7, 2026
Adding two data points from a downstream consumer (Hermes Agent), since this
directly affects every strict SSE client that refuses to fabricate terminal
markers:
1. The defect is model-specific, not path-wide. Same tiny probe
(
Reply with exactly: X), samePOST /zen/go/v1/chat/completionsendpoint,streaming + non-streaming:
null{"choices":[],"cost":"0"}nullstop[DONE]stop[DONE]stop[DONE]stop[DONE]stop[DONE]So the missing termination is confined to the 5.6-family (and kimi-k3) on
the chat/completions compatibility path, not a global behavior of that
endpoint.
2. Downstream impact + current workaround. Hermes deliberately refuses
to stamp
finish_reason="stop"on streams that end without one (it guards areal truncation class — see NousResearch/hermes-agent#32086), so every luna /
kimi-k3 response was treated as a mid-stream drop and every turn failed with
"Response remained truncated after 4 continuation attempts". The fallback
chain never engaged because the transport succeeds (HTTP 200, full content
delivered) — the defect is semantic, not a connection error.
Until this is fixed upstream, affected clients can either avoid the model on
this path (use
/zen/go/v1/responseswhere the termination is correct, orroute to another model) or apply a narrow model-scoped bypass. We published
a small patch script for the Hermes-side guard as a stopgap:
https://gist.github.com/jcmpgit/60087ac45da47c58ffe654781bada8fc
Happy to run any additional probes if it helps isolate where the terminal
marker is being dropped on the gateway side.
github-actions commentedon Oct 8, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.