Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4133 pages

AI for developers

tool_choice auto vs any vs required: How Claude, OpenAI and Gemini Force or Forbid Tool Calls

In short

In the tool_choice auto vs any debate the names differ per vendor but the four settings match: let the model decide, require a call, force one named tool, or forbid tools. Claude says auto, any, tool and none, OpenAI says auto, required, a forced function and none, Gemini says AUTO, ANY, NONE and VALIDATED. Forcing has side effects on Claude.

What are the tool_choice auto vs any settings called on each API?

A forced tool call is the quickest way to get a parseable action out of a model, and the slowest way to learn that a setting means something else on the next vendor. The table maps one intention to each API's wording.

What you wantClaudeOpenAIGemini
Let the model decideauto, the default when tools are providedauto, the default; zero, one or several callsAUTO is the default when only function declarations are enabled; VALIDATED is the default when built-in tools or structured outputs are also on
Require a call, any toolany: must use one of the tools, none in particularrequired: one or more callsANY: always predict a function call
Force one named tooltool with a nameA forced function: exactly one specific functionANY with allowed_function_names, where a list of one name leaves a single choice
Limit to a subsetNot covered on the page I readallowed_tools, which keeps the full tool list in the requestallowed_function_names under ANY or VALIDATED
No tool use this turnnone, the default when no tools are providednone, which imitates sending no functionsNONE, equal to sending no declarations while keeping your definitions

Checked against: source 1, source 2, source 3

What does forcing a tool change in the response?

On Claude, any and tool start the response with a tool call. The docs say Claude then emits no natural-language explanation before the tool_use blocks, even if you ask for one. They also say a forced call skips thinking on every model that accepts forced tool use, so the response has a tool_use block and no thinking block.

If you want an explanation together with a particular tool, the guide's answer is to stay on auto and say in the user message which tool to use.

Checked against: source 1

Where is forcing refused?

Claude does not accept every combination. With manual extended thinking, thinking type enabled, any and tool are not supported and fail, while auto and none still work. On Claude Fable 5.2, Mythos 5.2, Opus 5.5, Sonnet 5.5, Fable 5.1 and Mythos 5.1, any and tool return a 400 error whatever the thinking setting. For those models the docs point to auto together with strict tool use, or to structured outputs, to get schema-valid arguments.

The OpenAI and Gemini pages I read for this comparison list no such model restrictions on required, forced function, ANY or NONE.

Checked against: source 1

How do you stop the model calling several tools at once?

OpenAI exposes parallel_tool_calls. Setting it to false ensures exactly zero or one tool is called in a turn. The guide also notes that on a fine-tuned model that calls several functions in one turn, strict mode is switched off for those calls.

Gemini states that function calling supports parallel calls in one turn, calls in sequence and combination with built-in tools. From Gemini 3 onwards every functionCall carries a unique id, and your functionResponse must repeat that id so the model can match results to requests.

Checked against: source 2, source 3

How many tools should be on offer?

OpenAI suggests, as a soft limit, fewer than 20 functions available at the start of a turn, and recommends tool search to defer rarely used parts of a large tool surface. Its allowed_tools option exists so that the visible set can shrink across requests without rewriting the tools list, which keeps prompt caching effective.

Gemini's allowed_function_names serves a similar purpose inside ANY and VALIDATED modes, narrowing the choice to a named list.

Checked against: source 2, source 3

What does the mode VALIDATED add on Gemini?

VALIDATED is the default when built-in tools or structured outputs are enabled together with functions. Google describes it as constraining the model to predict either a function call or natural language while ensuring the call matches its schema, and says it reduces malformed function calls compared with AUTO. Claude and OpenAI have no setting of that name on the pages I read.

Checked against: source 3

What else do people ask?

Is required in OpenAI the same as any in Claude?

Close, but not identical in wording. OpenAI's required means the model calls one or more functions. Claude's any means it must use one of the provided tools. Both leave the choice of tool to the model.

How do I switch tools off without deleting their definitions?

Use none on Claude or OpenAI, or NONE on Gemini. Gemini's page says this disables function calling temporarily without removing the definitions.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. This page compares the three vendors' documentation, which I read on 20 Nov 2026. I did not call the APIs to see the modes behave, so it reports documented behaviour. It leaves out prices, tool-search features and each vendor's built-in tools. Found a mistake? Tell me.

Keep reading

Next step

Have a project in mind?

Tell me about it. A discovery call within 48 hours.