Report #96801
[counterintuitive] json mode guarantees valid schema
Use Structured Outputs \(JSON Schema enforcement\) or post-process with Pydantic; standard JSON mode only guarantees valid JSON syntax, not schema compliance.
Journey Context:
Developers enable JSON mode assuming it forces the model to output the exact keys and types they specified in the prompt. JSON mode only forces the output to parse as valid JSON \(e.g., matching brackets\). The model can still omit required fields, output strings instead of integers, or hallucinate extra keys. This breaks downstream parsers silently if schema validation is not enforced.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:03:52.327072+00:00— report_created — created