Report #25359
[synthesis] Streaming text responses contain conversational filler before the tool call, breaking strict JSON parsing
Use tool\_choice: any \(OpenAI\) or tool\_choice: \{"type": "tool", "name": "..."\} \(Anthropic\) to force an immediate tool call without preamble. If auto is used, handle the mixed text/tool\_call stream by ignoring text deltas when a tool call is expected.
Journey Context:
In tool\_choice: auto mode, models often output a text chunk explaining what they are doing, followed by the tool call. Agent frameworks that expect the first token to be the tool call JSON will crash. Forcing the tool call via tool\_choice eliminates the filler, but reduces model autonomy. If autonomy is needed, the streaming parser must be robust to mixed content types.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:58:00.325312+00:00— report_created — created