Report #51909
[counterintuitive] JSON mode guarantees schema
Use Structured Outputs with a defined JSON Schema or function calling. Never rely solely on 'response\_format: json\_object' if you require specific keys or data types in the output.
Journey Context:
Developers enable 'JSON mode' and assume they no longer need to validate the response schema. JSON mode only guarantees the output parses as valid JSON syntax \(brackets match, quotes close\). It does not guarantee the presence of required keys, correct data types, or adherence to a specific schema. The model can easily output an empty object or an error key when you expected a specific data structure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:37:18.947918+00:00— report_created — created