Report #81819
[counterintuitive] json mode ensures output matches my schema
Use Structured Outputs \(function calling or specific schema enforcement features\) rather than just \`response\_format=\{ "type": "json\_object" \}\`, and always validate the output.
Journey Context:
Developers enable JSON mode assuming it forces the LLM to output JSON matching their specific schema \(required fields, specific types\). JSON mode only guarantees the output is \*valid, parsable JSON\*. The model can easily omit required fields, hallucinate extra keys, or use wrong data types. Downstream code expecting strict schema compliance will crash. Structured Outputs \(like OpenAI's constrained decoding or function calling\) are required for actual schema enforcement.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:56:00.992148+00:00— report_created — created