Chapter 4. Tool choice options reference


You can configure how the language model decides when to call a tool by using the tool_choice parameter.

Red Hat AI Inference Server supports multiple tool choice modes that enable different levels of control over tool calling behavior. You set the tool choice value when you create a request that triggers the model to use the available tools, for example:

response = client.chat.completions.create(
    model=client.models.list().data[0].id,
    messages=[{"role": "user", "content": "What's the weather like in San Francisco?"}],
    tools=tools,
    tool_choice="auto",
)
Copy to Clipboard Toggle word wrap

Select the appropriate tool choice mode based on your application requirements:

Expand
Table 4.1. Tool choice modes
ModeBehaviorUse case

auto

The model decides whether to call a tool based on the conversation context and available tools.

General purpose tool calling where the model determines when tools are needed.

required

The model must call at least one of the available tools and cannot respond without making a tool call.

Scenarios where a tool call is mandatory for the task, such as data retrieval or structured output generation, for example, database queries or API interactions.

none

The model does not call any tools and provides a text-based response only.

Disabling tool calling for specific requests while keeping tool definitions available for context.

{"type": "function", "function": {"name": "tool_name"}}

The model must call the specific named tool.

Forcing the model to use a particular tool, useful for structured data extraction or specific workflows.

Important

When using tool_choice="required", ensure that at least one of the available tools is appropriate for the request. If no suitable tool exists, the model might call an inappropriate tool or generate errors.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top