Report #93259
[gotcha] AI response appears blank with no error when content filter triggers
Explicitly handle finish\_reason='content\_filter' in your streaming handler. When this value appears, render a user-facing message like 'This response was filtered for safety' instead of displaying an empty message bubble. The delta content will be empty — this is not a bug.
Journey Context:
When OpenAI's content safety filter triggers, the API returns chunks with an empty delta and finish\_reason set to 'content\_filter'. Most UI code only checks for the presence of delta content and silently renders nothing when it is empty. Users see a blank response and assume the app is broken, not that their input hit a safety boundary. This is a silent failure because the HTTP status is 200 and there is no error object — the refusal is encoded in the finish\_reason field that most developers never inspect. The UX must distinguish between 'the AI chose not to respond' and 'the app crashed'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:07:19.087765+00:00— report_created — created