Template G · Cheatsheet

tool_choice: auto, any, or forced.

A reference template that starts with implementation, then turns rules into tables, pitfalls, and related drills.

D2Decision supportPractice-linked

Quick rule

Use auto by default. Use any when a tool call must happen. Force a specific tool only in narrow pipelines.

On this page
1 · When / when not

Start with the decision.

The page opens with the operational choice. Candidates do not need a lecture before they can use the reference.

Default

Use auto for open-ended agentic loops. Use any when the first step must be a tool call.

2 · Rule table

Selection table

ModeUse whenAvoid when
autoModel may answer or call a tool.A tool call is mandatory.
anyAt least one tool must be called.The user might only need text.
forcedExactly one tool is correct.The model must select between tools.
3 · Pitfalls

Common mistakes

Surprised mascot — wide-eyed: oh, that was the trap.
Oh — that was the trap.Two patterns to avoid.
Forcing too earlyBlocks the model from answering simple clarifying questions.
Auto in mandatory lookupLets the model skip a required source of truth.
4 · FAQ

FAQ

What should I use by default?
Use auto unless the architecture requires a tool call.
Is forced common?
No. It is for constrained pipelines with one correct tool.