Report #55218
[counterintuitive] Enabling JSON mode ensures the LLM output matches my specific schema
Use Structured Outputs \(Function Calling or json\_schema response format\) rather than basic JSON mode, and always validate the output.
Journey Context:
Basic JSON mode \(response\_format: \{ 'type': 'json\_object' \}\) only guarantees the output is syntactically valid JSON, not that it contains the expected keys or types. Models frequently omit required fields or return empty objects \{\} when constrained only by basic JSON mode. Structured Outputs constrain the model's decoding to conform to a provided JSON Schema, guaranteeing schema compliance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:10:29.263365+00:00— report_created — created