---
title: "What is tool_choice? Forcing or blocking LLM tool calls"
description: "tool_choice controls whether a model may, must or must not call a tool, or which one it must call. The OpenAI and Anthropic options, and when forcing a call helps."
url: https://broadrouter.com/glossary/tool-choice/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# tool\_choice

Updated 2026-11-15

tool\_choice is a request parameter that controls tool use. In OpenAI's Chat Completions it can be auto (the model decides), required (it must call one or more tools), none (no tools), or a named function to force. Anthropic's equivalent options are auto, any, tool and none.

Also called: tool choice, forced tool call, forced function call

[Tool calling](https://broadrouter.com/glossary/tool-calling/) lets a model ask your code to run a function. tool\_choice decides whether that is optional, mandatory or off.

## How it works

You send `tools` (function names, descriptions and [JSON Schema](https://broadrouter.com/glossary/json-schema/) parameters) and optionally `tool_choice`.

| OpenAI value | Meaning | Anthropic equivalent |
| --- | --- | --- |
| `"auto"` | Model chooses a message or one or more calls; default when tools are sent | `{"type": "auto"}` |
| `"required"` | “The model must call one or more tools” | `{"type": "any"}` |
| `{"type": "function", "function": {"name": "get_weather"}}` | Forces that one tool | `{"type": "tool", "name": "get_weather"}` |
| `"none"` | No tool calls; default with no tools | `{"type": "none"}` |

OpenAI’s function calling guide also describes an allowed-tools option that restricts calls to a subset while keeping the full tool list unchanged, which it suggests for prompt caching.

```json
{"model": "broadnet/glm-5.3",
 "messages": [{"role": "user", "content": "Weather in Riyadh?"}],
 "tools": [{"type": "function", "function": {"name": "get_weather",
   "parameters": {"type": "object", "properties": {"city": {"type": "string"}},
                  "required": ["city"]}}}],
 "tool_choice": {"type": "function", "function": {"name": "get_weather"}}}
```

Anthropic’s docs note that with `any` or `tool` the API prefills the reply, so the model writes no text before the call, and that some Claude models reject forced tool use and return a 400 error.

## Why it matters

-   **Reliable pipelines.** An extraction step that must end in a call should not get a chatty text reply. Forcing the call removes that branch.
-   **Safe turns.** Setting `none` for a final summary turn stops the model from starting another tool round while keeping the same tool list.
-   **Caching.** Anthropic says changing `tool_choice` invalidates cached message blocks, so keep it stable across turns where you can.

## On BroadNet Inference

BroadNet’s [API reference](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-tool-choice&utm_content=body) documents tool calling for [GLM 5.3](https://broadrouter.com/models/glm-5.3/) and [Qwen3.8 27B](https://broadrouter.com/models/qwen3.8-27b/) only, and does not document `tool_choice`. Test each value you plan to use: send `required` or a named function and confirm the reply contains `tool_calls`. If forcing does not behave, use `auto` with a clear instruction and validate the result, or use [structured output](https://broadrouter.com/glossary/structured-output/) on the same models. The [open-model tool calling post](https://broadrouter.com/blog/tool-calling-open-models/) has a validate-and-retry loop.

## Common mistakes

-   Forcing a tool on every turn of an agent loop, so it can never give a final answer.
-   Assuming `required` means a specific tool. It means any tool.

## Questions

### What is the default tool\_choice?

In OpenAI's API, none when no tools are sent and auto when tools are present. Anthropic uses the same defaults.

### When should I force a tool call?

When the only acceptable answer is a call, such as a classifier that must call submit\_label. For a fixed JSON reply, structured output is often simpler.

### Does BroadNet Inference support tool\_choice?

BroadNet documents tool calling for GLM 5.3 and Qwen3.8 27B, but its API reference does not document tool\_choice. Test each value before relying on it.

## See also

-   [Tool calling](https://broadrouter.com/glossary/tool-calling/) (term)
-   [Parallel tool calls](https://broadrouter.com/glossary/parallel-tool-calls/) (term)
-   [Structured output](https://broadrouter.com/glossary/structured-output/) (term)
-   [JSON Schema](https://broadrouter.com/glossary/json-schema/) (term)
-   [AI agent](https://broadrouter.com/glossary/agent/) (term)
-   [ReAct (reason and act)](https://broadrouter.com/glossary/react-agent/) (term)
-   [Tool calling with open models: schemas, parallel calls, retries](https://broadrouter.com/blog/tool-calling-open-models/) (article)
-   [How to structure prompts so the prefix caches](https://broadrouter.com/blog/prompt-structure-for-caching/) (article)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-tool-choice&utm_content=page-cta) ·

**Sources**

-   [OpenAI API reference, create chat completion (tool\_choice) (checked 2026-11-15)](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create)
-   [OpenAI, function calling guide (tool\_choice) (checked 2026-11-15)](https://developers.openai.com/api/docs/guides/function-calling)
-   [Anthropic docs, define tools: forcing tool use (checked 2026-11-15)](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools)
