Report #54528
[counterintuitive] JSON mode schema validation
Use Structured Outputs \(e.g., \`json\_schema\` response format or function calling\) to enforce schemas; never rely on basic \`json\_object\` response format for schema adherence.
Journey Context:
Developers enable 'JSON mode' thinking it guarantees the output will match their expected keys and types. Basic JSON mode only guarantees valid JSON syntax \(it will close brackets\), but the model can output \`\{\}\` or omit required fields. It will happily generate valid JSON that completely violates your application's schema, causing downstream parsing errors. Structured outputs constrain the token generation to conform to a provided JSON schema.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:01:08.882630+00:00— report_created — created