Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 4.44 KB

File metadata and controls

49 lines (40 loc) · 4.44 KB

Tool Calling in TabbyAPI

Tool calling is available for supported models, and enabled by selecting a tool format in the model config. This can also be specifed per model using tabby_config.yml.

Most tool-calling models are also reasoning models, and it is recommended to enable reasoning as well with appropriate reasoning tags (these cannot currently be inferred from the model's template). The parser still respects these tags even if the model does not support tool calls or no tool_format is given.

model:
    reasoning: true
    reasoning_start_token: "<think>"
    reasoning_end_token: "</think>"
    tool_format: qwen3_5

Supported formats

Below are the currently recognized tool call formats. Reasoning tags should be supplied separately (see example above.)

tool_format Aliases Usual reasoning tokens Model types
qwen3_coder qwen3_5
step3_5
step3_7
<think> </think> Qwen3-Coder
Qwen3-Next
Qwen3.5 / Qwen3.6
Step-3.5 / Step-3.7
minimax_m2 <think> </think> Minimax-M2
Minimax-M2.1
Minimax-M2.5
glm4_5 glm4_6
glm4_7
<think> </think> GLM4.5
GLM4.6
GLM4.7
harmony ² gpt-oss-20b
gpt-oss-120b
hy3 ³ hy_v3 <think:opensource> </think:opensource> Hy3 (Tencent Hunyuan)
mistral_old ¹ (older Mistral-family models)
mistral [THINK] [/THINK] Codestral 2508+
Devstral-Small 2507+
Magistral-Medium 2506+
Magistral-Small 2506+
Ministral-3 2512+
Mistral-Medium-3.1 2508+
Mistral-Small-3.2 2506+
gemma4 <|channel>thought <channel|> Gemma 4-it

¹ Older Mistral models tend to have unreliable tool calling support and even newer ones are often released without official chat templates or with templates that omit any tool formatting. Tokenization also changes frequently between model releases. YMMV

² The Harmony format (gpt-oss) structures the whole response — reasoning, content and tool calls — as channeled messages. It is detected automatically from the model's special tokens and needs no configuration; tool_format: harmony is also accepted and is equivalent to setting harmony: true in the model config. When active it supersedes the reasoning and tool_format settings. Set harmony: false to override the detection.

³ Note that Hy3's standard chat template disables reasoning by default and does not respect enable_thinking. Clients can enable reasoning per request with the top-level reasoning_effort field or chat_template_kwargs: {"reasoning_effort": "high"} (options: no_think, low, high). To enable reasoning by default server-side, set template_vars_default: {reasoning_effort: high} in the model config (e.g. in the model folder's tabby_config.yml).