Report #90347
[synthesis] Models prepend conversational preambles to strict JSON outputs, breaking downstream parsers
For GPT-4o, use response\_format: \{ type: 'json\_object' \}. For Claude, explicitly request JSON and prefill the assistant response with '\{'. For Gemini, use responseMimeType: 'application/json'.
Journey Context:
GPT-4o's JSON mode is the most robust, completely eliminating preambles. Claude will almost always add a preamble unless you prefill the Assistant turn with '\{', which forces it to continue the JSON object. Gemini's JSON mode works but sometimes includes markdown fences which still breaks naive parsers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:14:22.387144+00:00— report_created — created