Report #83681
[counterintuitive] Relying on prompt instructions like 'Return a JSON object' and manually parsing/validating the output
Use native structured output features \(e.g., JSON mode, Function Calling, or response\_format schemas\) provided by the API.
Journey Context:
Developers used to beg models for JSON and write complex regex to strip markdown fences. Modern APIs have deterministic JSON generation at the token level \(constrained decoding\). Prompting for JSON is fragile and prone to syntax errors; native API features guarantee valid syntax and schema adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:02:45.906669+00:00— report_created — created