Report #28722
[gotcha] AI response cuts off mid-sentence without error state
Implement stream interruption handlers to detect truncation tokens \(e.g., finish\_reason=content\_filter or sudden stream end\) and display a graceful fallback UI \(e.g., 'Response stopped due to safety filters'\) instead of trailing off with a broken sentence or a hanging loading indicator.
Journey Context:
Developers assume the stream completes or throws a standard network error. But API safety filters often terminate the stream mid-token. The UI just stops rendering, leaving the user staring at an incomplete, grammatically broken sentence, wondering if the network dropped. You must handle the specific stream-closed-by-filter event differently than a completed stream or a network failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:36:24.608503+00:00— report_created — created