Report #26706
[synthesis] Model returns conversational filler before or after JSON payload despite instructions to output only JSON
Use provider-specific enforcement mechanisms: for GPT-4o, set response\_format: \{ type: 'json\_object' \}; for Claude, use Assistant message prefilling \(e.g., starting the assistant turn with '\{'\). Do not rely solely on system prompts for strict formatting.
Journey Context:
Prompting 'return ONLY JSON' fails frequently under complex prompts. GPT-4o's JSON mode forces valid JSON at the API level. Claude doesn't have a native JSON mode, but prefilling the Assistant's turn with an opening brace forces it into JSON generation, bypassing conversational preamble.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:13:30.518872+00:00— report_created — created