Repository navigation
Description
Description
Model: ox-alpha-free (Go plan free tier, "Ox Alpha Free (Unlimited)")
Endpoint: https://opencode.ai/zen/go/v1/chat/completions (OpenAI-compatible SSE, stream: true)
Client: Pi coding agent (earendil-works/pi v0.84.2) — strict OpenAI-SSE parser
OS: Windows 11
On long generations, the gateway severs the stream server-side without emitting finish_reason and without data: [DONE]. Strict OpenAI-compatible clients therefore throw Stream ended without finish_reason and discard the whole partial response. This is 100% reproducible with a complex prompt, and is the ox-alpha-free instance of the same gateway bug class as #43379 / #43882 (muse-*) and #44148 (mid-stream cutoffs on long-reasoning requests).
Why the complex prompt triggers it
ox-alpha-free burns its entire budget on reasoning. A max_tokens=8000 request produced 3134 reasoning tokens and 0 visible content tokens. Complex prompts (e.g. "write a complete interactive single-file HTML") push the reasoning phase past the gateway's patience window (3–7 min), at which point the stream is killed. Simple prompts finish reasoning quickly and complete normally — which is why the failure only shows up on long tasks.
Reproduction (direct HTTPS probes, same API key, no agent in the loop)
Prompt used:
我需要一个解释洛伦兹变换的可视化科普设施,你最好用二维例子,x-y-t立体网格坐标,
附带交互组件。让我完全理解,你必须保证这个科普设施能让我完全理解为啥(ct)^2 - x^2 - y^2是不变量。
使用单html文件构建
| Request | Result |
|---|---|
Simple prompt ("1+1"), max_tokens=200 |
OK: finish_reason="stop" + [DONE] in 15s |
Complex prompt, max_tokens=8000 |
Gateway emits finish_reason="length" properly, but usage shows 3134 reasoning tokens / 0 content tokens — the model never starts writing an answer |
Complex prompt, max_tokens=32000 |
Stream severed at 403s mid-reasoning: last chunk is a complete JSON reasoning delta, then EOF. No finish_reason, no [DONE], 0 text chars |
Complex prompt, max_tokens=131072 (what strict clients send) |
Stream severed at 211s mid-reasoning, same signature: clean close after a complete chunk, no finish_reason, no [DONE] |
Complex prompt + reasoning_effort="low" |
Parameter appears to be ignored: reasoning tokens 3134 (vs 3130 baseline), still 0 content |
Same complex prompt on deepseek-v4-flash via the same gateway/key |
Completes normally: finish_reason="stop" + [DONE], 174k chars reasoning + 20k chars answer, 313s |
The kill time varies (211s / 403s across runs), so it looks like server-side preemption or a resource cap rather than a fixed client-visible limit.
Client-side error in strict clients
When the stream ends without finish_reason, pi's OpenAI parser throws:
Error: Stream ended without finish_reason
and discards the partial response (per-spec: the final chunk must carry a non-null finish_reason followed by data: [DONE]).
Additional framing issue
In one captured stream, 141 of ~2,378 events contained raw newlines embedded inside JSON strings (the reasoning_content delta spans multiple physical lines), splitting a single SSE event across several data:-free lines. Line-based SSE parsers see these as truncated JSON events.
Expected behavior
When the gateway severs a generation (time cap, preemption, quota), it must still close the OpenAI-compatible stream per spec: a final chunk with finish_reason (e.g. "length") followed by data: [DONE]. The 8k-cap probe shows the gateway can do this — it's specifically the long-run kill path that omits the terminal chunk.
Related issues
- [Go plan] Empty completions (finish_reason=other) and mid-stream cutoffs on long-reasoning requests — reproduced via direct API calls across multiple models #44148 — mid-stream cutoffs on long-reasoning requests (paid models, same signature)
- Streaming responses for muse-* models on the Zen gateway never send finish_reason — strict OpenAI-compatible clients enter a retry loop #43379 / muse-spark-1.2-contributor-free: stream always ends without finish_reason — every request fails in strict OpenAI-compatible clients #43882 — muse-* models never send
finish_reason - bug: Hermes Agent — gpt-5.6-luna via opencode-go provider returns finish_reason:null (no [DONE]) #40420 — gpt-5.6-luna missing
finish_reason - Ox Alpha Free (Unlimited) not working it will start thinking and dont give any output #44332 / Provider finish_reason: network_error with Ox Alpha Free (unlimited) #44379 / ox-alpha-free via zen/go/v1: any tools payload returns network_error/503 since 2026-08-23 (was working 02:55-06:11) #44382 — other ox-alpha-free outage reports
Activity
github-actions commentedon Aug 23, 2026
This issue might be a duplicate of existing issues. Please check:
(You've already referenced #44148, #43379, and #43882 in your report, which are the closest gateway-level duplicates — good cross-linking.)
rekram1-node commentedon Aug 24, 2026
We are working with the provider of the stealth model, but they are having issues on their end, I think this specific one should be resoolved now