Report #72329
[counterintuitive] JSON mode guarantees schema validation
Use Structured Outputs \(function calling or specific JSON schema enforcement\) or external validation \(like Pydantic\) with retries, because standard \`response\_format: \{ type: json\_object \}\` only guarantees valid JSON syntax, not schema compliance.
Journey Context:
Developers enable JSON mode and assume the output will match their expected keys/types. JSON mode just forces the tokens to form valid JSON syntax, but the model can still output arbitrary keys, wrong data types, or miss required fields, leading to parsing errors downstream.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:59:33.684653+00:00— report_created — created