Hey Everyone, We took a look at the issue and the responses you’re getting aren’t malformed in the sense of being invalid JSON. They’re valid and parseable, but the shape isn’t guaranteed to be consistent when using JSON Mode. That behavior is expected and aligns with our developer documentation.
JSON Mode ensures the output is valid JSON, but it does not guarantee that the response will follow a specific schema or nesting structure. This means keys can occasionally be missing, moved, or spelled differently. Because of that, applications using JSON Mode need to handle these edge cases themselves (for example, via validation and retries).`
If you need the output to always match a fixed JSON structure, the recommended approach is to switch to Structured Outputs. Structured Outputs enforce a provided JSON schema, ensuring required keys are present and correctly nested, and preventing unexpected fields. Hope that helps. Thank you!
Pinging @roy.amit : Can you confirm whether this is a misunderstanding of how structured outputs differ from JSON mode? If so, this would simply be a mix-up.
Sorry, but no.
I actually gave the response_id of a real malformed json, so this doesn’t solve it.
I also gave a request id of a bad structured output.
This issue is new, and my code got tens of thousands of valid JSONs from the api until something broke.
We will work with our team to get this reviewed again but just to be sure as per our docs we encourage using structured outputs as structured outputs is the evolution of JSON mode. While both ensure valid JSON is produced, only Structured Outputs ensure schema adherence. Both Structured Outputs and JSON mode are supported in the Responses API, Chat Completions API, Assistants API, Fine-tuning API and Batch API. Furthermore, @_j we have our team looking into this issue which is slightly different from what being discussed here.
The crux of the issue: the model performance was degraded over a week ago, for a developer app in service for a long time. “Fix your usage to adapt to us messing with the model (which we will not admit to or revert)” should not be the signal to developers.