Report #37822
[counterintuitive] JSON mode ensures valid API schema
Use strict structured outputs \(function calling / specific JSON schema enforcement\) rather than basic JSON mode, and always validate the output against a schema validator on the client side.
Journey Context:
Basic 'JSON mode' \(like OpenAI's older \`response\_format=\{ "type": "json\_object" \}\`\) is widely assumed to guarantee the output conforms to a specific API schema. In reality, it only guarantees the output is \*parseable\* JSON \(valid syntax\), not that it contains the correct keys, types, or required fields. It will happily emit \`\{"invalid\_key": "foo"\}\`. You need strict schema enforcement features or client-side validation to guarantee structural compliance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T17:57:56.960394+00:00— report_created — created