You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On /v1/responses, a tool_choice of type allowed_tools is dropped for every provider that serves Responses through the chat bridge (ResponsesViaChat). These include Gemini, Vertex, Groq, Ollama, Cohere, Bedrock, the OpenAI-compatible adapters and others. The request succeeds, and the model can call any declared function, including ones the caller excluded.
normalizeResponsesToolChoiceForChat (internal/providers/responses_adapter.go:292) keeps only string choices and type: "function". Every other object type returns nil on purpose, because hosted-tool choices have no chat equivalent. allowed_tools over function tools is translatable, but it is dropped along with them.
Why not just keep it in the bridge
The bridge is shared. Converting the choice to the Chat Completions shape ({"type": "allowed_tools", "allowed_tools": {"mode", "tools"}}) would hand it to adapters that cannot express it. The Anthropic chat adapter rejects it as an unsupported tool_choice type, and the OpenAI-compatible adapters forward it to upstreams that may not accept it. Each provider needs its own decision: map it, narrow the declared tools, or reject.
Suggested approach
Convert Responses allowed_tools over function tools into the chat shape in the bridge.
AI Generated comment: