Report #87998
[gotcha] Content filter refusals stream as normal text, making them indistinguishable from real answers until they suddenly stop
Check the first streaming chunk for refusal indicators \(OpenAI structured outputs include a refusal field in the first chunk's message object\). On detection, immediately halt streaming display and render a distinct refusal UI state — different background, icon, and clear language — rather than streaming refusal text character by character as if it were a normal response.
Journey Context:
When a model refuses a request due to safety filters, the refusal text streams in just like a normal response. Users start reading it as an answer, then slowly realize it's a refusal. This creates a jarring experience where the user's mental model of 'the AI is answering me' is disrupted mid-stream. The refusal text itself \('I cannot assist with...'\) is often indistinguishable from a legitimate response in the first few tokens. With OpenAI's structured outputs, the API explicitly signals refusals via a dedicated field, but many developers don't check it. For non-structured outputs, you need to pattern-match on the streamed text, which is fragile. The key insight: refusal UX should be a distinct UI state, not streamed text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:17:30.480053+00:00— report_created — created