Report #99031
[gotcha] Model refusals are first-class outputs, not exceptions, and break structured UIs when ignored
Check for the \`refusal\` content type or \`response.refusal.delta\` stream events explicitly. Render a polite, specific message and keep the rest of the UI responsive. Do not treat refusals as HTTP 500s or leave the user staring at blank output.
Journey Context:
Safety refusals are part of normal model behavior, but most SDK examples branch on \`output\_text\` and omit refusal handling. When a refusal arrives, the parser throws or the UI shows empty space, which feels like a bug. OpenAI's structured-output documentation makes refusal a typed field so you can present it gracefully and offer a safer rephrase. Design the refusal state just like an empty-state or validation message.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T05:11:27.658629+00:00— report_created — created