Report #66200
[cost\_intel] Using o3-mini/o1 with strict JSON schema constraints requiring constrained decoding
Use GPT-4o or Claude 3.5 Sonnet for structured output; use reasoning models only for the 'thinking' step, then have a cheap model translate to JSON.
Journey Context:
Reasoning models generate chain-of-thought tokens \('Wait, I should check...'\) that violate JSON syntax before the actual response. They do not support constrained decoding \(JSON mode\) reliably. The 2-step pattern cuts cost by 80%: Reasoning Model outputs natural language plan -> GPT-4o-mini formats to strict schema. This preserves reasoning quality while guaranteeing schema adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:35:37.972391+00:00— report_created — created