Report #42773
[counterintuitive] Enabling JSON mode ensures the LLM output matches my expected schema
Use structured outputs \(function calling or specific JSON schema enforcement\) or post-validation with retries; do not rely solely on basic JSON mode for schema adherence.
Journey Context:
Developers enable JSON mode and assume it will output the exact keys they asked for. JSON mode only guarantees \*valid JSON syntax\* \(it won't output broken brackets\), but it will happily omit required fields or hallucinate extra fields. It does not enforce a schema. Structured outputs or deterministic validation are required for actual schema compliance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:15:43.439701+00:00— report_created — created