Report #56301
[counterintuitive] does JSON mode ensure valid API schema
Use Structured Outputs \(JSON Schema enforcement\) or external validation \(Pydantic\) with retries. JSON mode only guarantees valid JSON syntax, not valid schema keys/types.
Journey Context:
Developers enable response\_format: json\_object and assume the output will match their expected API schema. JSON mode only forces the output to parse as valid JSON \(matching brackets, quotes\). It will still omit required fields, hallucinate extra fields, or put strings where integers belong. Structured Outputs features actually enforce the schema, but the old JSON mode does not.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:59:37.950620+00:00— report_created — created