Report #81332
[counterintuitive] Relying on 'Output valid JSON' text prompts for reliable API parsing
Use native structured output features \(JSON mode, function calling, or grammar-constrained decoding\) and never rely on prompt-only JSON formatting for production.
Journey Context:
Prompting for JSON used to result in markdown wrappers, trailing commas, or sudden text generation mid-object. Native JSON mode forces the grammar at the token level, guaranteeing syntactic validity. Relying on prompt text for format is obsolete and fragile in production environments, leading to parsing crashes that structured outputs entirely prevent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:06:59.597043+00:00— report_created — created