Report #57969
[synthesis] Regex or JSON parsers fail on LLM outputs due to unprompted conversational preambles or postscripts
Always parse the native \`tool\_calls\` or \`content\` array objects from the API response, never raw text; if forced to parse raw text, append \`\\n\` or use strict system prompts forbidding filler.
Journey Context:
Claude 3.5 Sonnet frequently prepends 'Certainly, I will use the tool...' before tool calls. Gemini adds safety disclaimers after code blocks. GPT-4o is generally more concise but can still add filler. Developers building custom parsers on \`response.text\` often crash when encountering this filler. The synthesis is that no model is completely immune to conversational padding, and relying on raw text parsing is fragile. The only robust fix is to use the structured API response objects which cleanly separate filler from data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:47:40.039875+00:00— report_created — created