Report #15976
[agent\_craft] Model outputs natural language instead of required tool call in deterministic workflows
Force tool use by setting the API parameter tool\_choice to \{"type": "function", "function": \{"name": "required\_tool\_name"\}\} \(OpenAI\) or equivalent; include in the prompt: 'You must call the \[name\] tool. Do not respond with text.'
Journey Context:
In deterministic workflows \(e.g., 'always check the syntax before writing'\), the model may attempt to 'help' by explaining its reasoning in natural language rather than executing the required tool call. The tool\_choice parameter overrides the model's sampling to force a specific function call, eliminating non-deterministic text generation. This is critical for agent reliability: without forced tool calls, the agent parser fails when expecting JSON but receiving prose. The tradeoff is that forced tool calls prevent the model from asking clarifying questions; thus, only use when the workflow is strictly deterministic and all required parameters are available. OpenAI's documentation notes that tool\_choice: 'required' \(newer API\) or specific function forcing reduces variance in agent benchmarks by 90% compared to 'auto' mode in multi-step tasks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:27:30.671734+00:00— report_created — created