Report #92795
[synthesis] JSON mode or persona constraints fail intermittently across different LLM providers
Use Claude's assistant pre-filling to force JSON/Markdown structure, but use GPT-4o's response\_format: json\_object instead, as GPT-4o ignores or fights assistant pre-fills.
Journey Context:
Claude respects assistant-turn pre-fills \(e.g., \{"role": "assistant", "content": "\{"\}\) to force JSON output and skip conversational preambles. GPT-4o will often append to the pre-fill incoherently or ignore the constraint, requiring response\_format instead. Gemini's API restricts assistant pre-fills entirely in multi-turn tool contexts. Agents must branch their API payload construction based on provider.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:20:48.922898+00:00— report_created — created