Report #77092
[counterintuitive] JSON mode guarantees valid schema
Use Structured Outputs \(function calling or specific schema enforcement\) rather than just \`response\_format=\{ 'type': 'json\_object' \}\` to guarantee schema compliance.
Journey Context:
Developers enable JSON mode assuming the output will match their expected keys and types. JSON mode only guarantees the output is syntactically valid JSON \(parses without error\); it does \*not\* guarantee the schema matches your application's expectations. Models frequently omit required keys, swap data types, or hallucinate extra fields. Structured outputs with constrained decoding or function calling schemas are required for true schema validity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:59:17.572879+00:00— report_created — created