Report #80454
[counterintuitive] JSON mode guarantees valid JSON schema
Use structured outputs \(function calling or JSON schema enforcement\) or Pydantic validation, as basic JSON mode only guarantees valid JSON syntax, not schema adherence.
Journey Context:
Developers enable response\_format with json\_object and assume it will match their expected schema. It only guarantees the output parses as valid JSON without throwing a syntax error. It will often omit required fields or hallucinate extra fields. True schema enforcement requires explicit constraints like function calling or the newer structured outputs feature.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:38:51.328829+00:00— report_created — created