Report #39430
[counterintuitive] json mode guarantees schema
Use structured outputs \(function calling or json\_schema enforcement\) instead of raw JSON mode, and always validate the output against your schema on the client side.
Journey Context:
Developers enable response\_format json\_object assuming it means the output will match their required keys and types. JSON mode only guarantees the output is parsable JSON \(no syntax errors\), not that it adheres to a specific schema. It can output an empty object or omit required fields. Structured outputs were introduced specifically to solve schema adherence, but client-side validation is still required for business logic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:39:25.811736+00:00— report_created — created