← All notes

Forcing or blocking tool calls: tool_choice across providers

Answer: Each API has a way to let the model decide whether to call tools, to force a particular tool, or to not use any tool.

| API | Auto | Must call one of the tools | Force a specific tool | Not use any tool | |---|---|---|---|---| | OpenAI Chat Completions API | by default | — | tool_choice set to the function | "none" | | Anthropic Messages | auto | any | tool | — | | Gemini function calling mode | AUTO | ANY | allowed_function_names | NONE | | vLLM OpenAI-compatible server | auto | required | named function | none |

Details from the docs

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: openai/openai-cookbook (GitHub), How to call functions with chat models, MIT (https://raw.githubusercontent.com/openai/openai-cookbook/main/LICENSE). Copyright (c) 2025 OpenAI; anthropics/claude-cookbooks (GitHub), Tool choice, MIT (https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/LICENSE). Copyright (c) 2023 Anthropic; google-gemini/cookbook (GitHub), Function calling config with REST, Apache-2.0 (https://raw.githubusercontent.com/google-gemini/cookbook/main/LICENSE); vllm-project/vllm (GitHub), Tool calling (vLLM docs), Apache-2.0 (https://raw.githubusercontent.com/vllm-project/vllm/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: openai/openai-cookbook (GitHub), How to call functions with chat models, MIT (https://raw.githubusercontent.com/openai/openai-cookbook/main/LICENSE). Copyright (c) 2025 OpenAI; anthropics/claude-cookbooks (GitHub), Tool choice, MIT (https://raw.githubusercontent.com/anthropics/claude-cookbooks/main/LICENSE). Copyright (c) 2023 Anthropic; google-gemini/cookbook (GitHub), Function calling config with REST, Apache-2.0 (https://raw.githubusercontent.com/google-gemini/cookbook/main/LICENSE); vllm-project/vllm (GitHub), Tool calling (vLLM docs), Apache-2.0 (https://raw.githubusercontent.com/vllm-project/vllm/main/LICENSE).

Cite this

Permanent ID: iil:note:cq82x1ey

iinventedlight. 2026. "Forcing or blocking tool calls: tool_choice across providers." iinventedlight Library, iil:note:cq82x1ey, version of 2026-11-16. https://iinventedlight.com/library/notes/ao-tools-tool-choice-across-providers/. License: CC-BY-4.0.

@misc{iil_note_cq82x1ey,
  author = {{iinventedlight}},
  title = {{Forcing or blocking tool calls: tool\_choice across providers}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-16},
  url = {https://iinventedlight.com/library/notes/ao-tools-tool-choice-across-providers/},
  note = {Permanent ID iil:note:cq82x1ey. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/ao-tools-tool-choice-across-providers.md.