Report #95170
[counterintuitive] Enabling JSON mode guarantees valid API outputs
Always validate the semantic content and schema constraints of the JSON output; use constrained decoding \(like grammars/CFGs\) rather than just JSON mode.
Journey Context:
Developers enable JSON mode and assume the output is safe to parse and use. JSON mode only guarantees syntactic validity \(curly braces match\). The model can still hallucinate invalid enum values, omit required fields, or output wrong data types. Constrained decoding \(e.g., JSON Schema grammars\) is required for strict schema adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:19:19.266229+00:00— report_created — created