Report #61779
[counterintuitive] Enabling JSON mode guarantees the output matches my specific JSON schema
Use structured outputs / JSON schema enforcement \(like OpenAI's Structured Outputs or Outlines/guidance\) rather than just response\_format: json\_object.
Journey Context:
Early JSON modes only guaranteed the output was valid JSON \(i.e., parsable\), not that it adhered to a specific schema \(missing required keys, wrong types\). Devs would still get parsing errors. Newer structured output features actually constrain the token generation to follow a provided JSON schema, guaranteeing syntactic and structural validity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:11:08.272770+00:00— report_created — created