I’m using strict JSON Schema output in an OpenAI API request and wondering what happens when the model needs to refuse. Does the response still contain a schema-shaped object, or is the refusal surfaced outside the requested structure?
I’m especially interested in how people handle this in clients that expect to parse every successful response as JSON. Is there a reliable way to distinguish a refusal from a schema or parsing failure?
Can you answer this question?
Write Answer0 Answers