Report #48087
[counterintuitive] JSON mode ensures output matches my schema
Use constrained decoding \(e.g., \`json\_schema\` response format\) or Pydantic validation with retries; do not rely on basic JSON mode for schema adherence.
Journey Context:
Developers enable \`response\_format=\{ "type": "json\_object" \}\` and expect it to output their specific schema. Basic JSON mode only guarantees the output parses as valid JSON syntax \(e.g., \`\{\}\` is valid but misses all required fields\). Models will still omit required keys or output wrong types. Constrained generation is required for strict schema enforcement.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:11:53.259300+00:00— report_created — created