Report #47830
[gotcha] Dropped SSE streaming connections appear as complete responses rather than errors
Implement explicit stream completion detection: check for the \[DONE\] sentinel in OpenAI SSE streams or message\_stop event type in Anthropic streams. If the stream ends without this signal, treat it as a truncated response error and offer retry. Add a token-count or sentence-completion heuristic to detect suspiciously short responses that may be truncated.
Journey Context:
SSE streams can drop due to network issues, timeouts, or load balancer interventions. When the connection closes, the client's event source simply stops receiving events — which looks identical to a normally completed stream. The UI shows what appears to be a complete response, but it's actually truncated mid-sentence. Users may not notice \(especially with long responses\) and act on incomplete information. Standard error handlers don't fire because there's no error event — just silence. The fix requires explicit completion signaling: the stream must end with a known sentinel, and absence of that sentinel means truncation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:45:53.037678+00:00— report_created — created