Report #86461
[synthesis] Model adds conversational filler text outside JSON or tool call blocks breaking parsers
For GPT-4o, use response\_format: \{ type: 'json\_object' \} or strict tool calling; for Claude, prepend the assistant turn with '\{' or explicitly instruct 'Output only valid JSON/tool calls with no other text'.
Journey Context:
GPT-4o often prefaces tool calls or JSON output with 'Certainly\! Here is the JSON...' even when explicitly told not to, breaking strict JSON parsers. Claude 3.5 Sonnet is better at suppressing filler but will still add conversational text if the system prompt isn't rigid. The most robust cross-model fix is to start the assistant response with the opening brace or bracket \(pre-filling\) for Claude, and using the native response\_format parameter for OpenAI models.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:42:38.099519+00:00— report_created — created