Report #45063
[counterintuitive] Enabling JSON mode guarantees the LLM output matches my expected schema
Always validate LLM JSON outputs against your schema on the application side, or use Structured Outputs \(if supported by the provider\) which enforces the schema at the engine level.
Journey Context:
Developers enable JSON mode and assume the output will perfectly map to their expected keys and types. Standard JSON mode only guarantees that the output is syntactically valid JSON \(parsable\), not that it contains the correct keys, required fields, or correct data types. The model can easily omit required fields or hallucinate extra ones.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:06:25.259886+00:00— report_created — created