Report #104093
[counterintuitive] JSON mode guarantees the model will return the schema you need.
Use strict Structured Outputs \(response\_format json\_schema with strict: true\) or strict function-call schemas; validate with Pydantic/Zod afterward. Treat legacy JSON mode \('json\_object'\) as 'valid JSON, no schema promise' for older models only.
Journey Context:
JSON mode was the first structured-generation feature: it forces valid JSON but the model can still invent keys, omit required fields, or mistype values. Structured Outputs uses constrained decoding so the model physically cannot violate the supplied JSON Schema on supported models. It also exposes a refusal field for safety declines. Many agents still parse free-form JSON with regex because they have not migrated; that is a reliability tax.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T05:13:13.181587+00:00— report_created — created