opencode Go gateway cuts off deepseek-v4.1-flash streams without finish_reason on 6-9% of calls
FFFengMJL · ghdev · 2026-10-19
A GitHub issue on anomalyco/opencode documents that between 15:41 and 17:05 UTC+8 on 2026-10-19, three concurrent agent sessions using the opencode Go inference gateway with deepseek-v4.1-flash hit 42 chat-completion streams (6.3%–8.6% per session) that ended after emitting content but without a terminal finishreason chunk or data: [DONE].
Key points:
- HTTP status was 200 and the connection closed cleanly (chunked transfer), with no error frame, so clients cannot easily distinguish this from success;
- Strict OpenAI-compatible clients hard-fail with "stream closed before finishreason", while tolerant ones silently record an empty/unknown finish;
- Local experiments ruled out client bugs and network cuts, placing the fault on the gateway side;
- The issue occurred with stream:true, includeusage, reasoningeffort:max and tools attached, sometimes cutting off partial tool-call arguments.
A useful caution for agent developers building OpenAI-compatible stream parsers: guard against clean EOF by tracking both finishreason and [DONE].
More from Infra
- Cadence announces sovereign AI cloud for European chip designers — karlfreund · 2026-10-23
- SGLang Deep-Dive Blog Series Breaks Down KV Cache, Posts up to 15.5x Throughput Gains — BanghuaZ · 2026-10-23
- DynaLM: Open-Source CPU-First LLM Inference Engine Seeks Feedback — Unlikely_Safety_7456 · 2026-10-23
- Capital Is Now the AI Buildout Bottleneck, Says Analyst Citing Jensen Huang — JOBhakdi · 2026-10-23
- DynaLM: an open-source CPU-first LLM inference engine seeks testers and feedback — Unlikely_Safety_7456 · 2026-10-23
- Cerebras explains how it deploys trillion-parameter models on wafer-scale chips — bookwormengr · 2026-10-23