Report #26919
[synthesis] tool\_choice parameter silently ignored or misrouted across providers
Build an adapter that maps four semantic modes \(auto, required/any, none, specific-tool\) to each provider's wire format. OpenAI: \{tool\_choice:'auto'\|'required'\|'none'\|\{type:'function',function:\{name:'X'\}\}\}. Claude: \{tool\_choice:\{type:'auto'\}\|\{type:'any'\}\|\{type:'tool',name:'X'\}\}. Gemini: tool\_config.function\_calling\_config with mode:'AUTO'\|'ANY'\|'NONE' plus allowed\_function\_names. Never pass one provider's format directly to another.
Journey Context:
The conceptual intent is identical — auto, force, disable, or pin a specific tool — but the wire formats are completely incompatible. A frequent bug in multi-provider agent frameworks is passing OpenAI's \{tool\_choice:'required'\} to Claude's API, which silently falls back to auto, or passing Claude's \{type:'any'\} to OpenAI, which raises a validation error. The adapter pattern is the only sane approach: define your own internal enum, then emit the correct format per provider. This also future-proofs against format changes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:35:04.639311+00:00— report_created — created