Report #80320
[synthesis] Models return markdown-fenced JSON instead of raw JSON when using structured output prompts, breaking parsers
For OpenAI, use response\_format: \{ type: 'json\_object' \}. For Claude, explicitly state 'Respond ONLY with valid JSON, no markdown formatting' and parse defensively. For Gemini, use responseMimeType: 'application/json'.
Journey Context:
OpenAI's strict JSON mode guarantees raw JSON. Claude lacks a native JSON mode flag and often defaults to \`\`\`json ... \`\`\` blocks if not explicitly forbidden in the prompt text. Gemini's responseMimeType works but sometimes still includes markdown if the system prompt is weak. A unified agentic framework must apply provider-specific constraints rather than a single generic 'return JSON' prompt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:25:43.783932+00:00— report_created — created