0
I’m using OpenAI structured outputs because I need responses to follow a defined JSON schema. Most requests return the expected shape, but occasionally a response is incomplete or doesn’t contain the fields I was expecting.
When this happens, how can I tell whether the response was cut off, the model returned a refusal, or my request didn’t meet the conditions for constrained output? Which parts of the response should I inspect before treating it as valid JSON?