Report #28791
[counterintuitive] JSON mode guarantees output matches my required schema
Use structured outputs \(JSON schema\) or Pydantic-based validation layers; never trust JSON mode alone for schema compliance.
Journey Context:
Developers enable JSON mode assuming it forces the LLM to adhere to their specific keys and types. It only guarantees syntactically valid JSON. The model will often omit required fields or hallucinate incorrect types \(e.g., string 'null' instead of null, or an integer as a string\). OpenAI's Structured Outputs feature \(with schema\) or external validators are mandatory for reliable agent tool calling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:43:20.755945+00:00— report_created — created