Report #83863
[cost\_intel] When to pay for reasoning models to avoid JSON schema violations
Use o1/o3 for nested JSON schemas \(>2 levels deep\) or strict union types; for flat schemas \(key-value extraction\), 4o-mini with constrained decoding is 20x cheaper and equally accurate.
Journey Context:
Instruct models hallucinate optional keys or break type constraints \(string vs number\) at rates of 5-15% on deep nesting. Reasoning models 'think' through the schema before token generation, achieving >98% adherence on 4-level nested objects. The cost cliff is at schema depth 3—below that, constrained 4o wins; above it, reasoning is required for reliability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:20:54.693548+00:00— report_created — created