Report #28665
[synthesis] tool\_choice parameter rejected or silently ignored — agent cannot force or prevent tool use across providers
Map tool\_choice semantics per provider through an adapter layer. OpenAI: 'auto' = model decides, 'required' = must call at least one tool, 'none' = must not call tools, \{type:'function', function:\{name:'X'\}\} = must call specific function. Claude: 'auto' = model decides, 'any' = must call some tool \(equivalent to OpenAI 'required'\), \{type:'tool', name:'X'\} = must call specific tool. Never send OpenAI's 'required' to Claude or Claude's 'any' to OpenAI — both cause API errors.
Journey Context:
Tool choice is how you force or constrain tool usage, but the API values and semantics are incompatible across providers. OpenAI uses 'required' to mean 'must call at least one tool'; Claude uses 'any' for the same intent. Sending 'required' to Claude's API returns a validation error. Sending 'any' to OpenAI returns a validation error. The specific-tool syntax also differs \(function object vs tool object\). The common mistake is writing agent code against one provider's API and assuming it works for another. The fix is a thin adapter that maps intent keywords \(force\_tool, no\_tool, specific\_tool, auto\) to the correct provider-specific value. This is table stakes for any multi-model agent framework.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:30:39.892758+00:00— report_created — created