Repository navigation
Description
What happens
With a local GGUF model loaded in Studio, a chat completion that asks for the
built-in web search by name runs no tools at all. The same request with
enabled_tools omitted runs it.
Both requests below were sent seconds apart, to the same server, with the same
model, the same prompt and the same forced tool_choice:
enabled_tools |
web_search executions | ANY tool executions | reply |
|---|---|---|---|
["web_search"] |
0 | 0 | "The current version of the Linux kernel is 6.10 (released in August 2025)." |
| omitted (all local tools) | 1 | 1 | "The current version of the Linux kernel is 6.10." |
The zero in the middle column is the point: with enabled_tools: ["web_search"]
the loop ran nothing whatsoever, so the model was answering from its own
knowledge rather than choosing a different tool. execute_tool: name=web_search
never appears in the server log for that request, and neither does any other
execute_tool line.
Request
{
"model": "default",
"messages": [{"role": "user", "content": "Search the web for the current version of the Linux kernel, then answer in one sentence."}],
"enable_tools": true,
"enabled_tools": ["web_search"],
"permission_mode": "off",
"tool_choice": {"type": "function", "function": {"name": "web_search"}},
"max_tokens": 512,
"temperature": 0.0
}Dropping the enabled_tools line, and changing nothing else, makes the search run.
Where it looks like it comes from
studio/backend/routes/inference.py:_selects_only_provider_hosted_tools reads a
request whose enabled_tools are all hosted-tool names as an ask for the
provider's own hosted builtins, and web_search is in HOSTED_TOOL_NAMES.
For a local llama.cpp model that should not apply. provider_hosted_tools says
so in its own docstring: "Empty for the self-hosted presets (llama.cpp, vLLM,
Ollama, custom)". So the local loop should be kept here, and the measurement
says it is not.
enable_tools: true plus enabled_tools: ["web_search"] is also the shape a
caller reaches for first when they want exactly one tool, which is why this is
easy to hit and quiet when it happens: the reply looks like a normal answer.
Reproduced
Two Kaggle 2xT4 sessions on separate accounts, both with the full table above:
one at 1595.1s and one at 1294.7s. Three earlier sessions saw the named-only
form fail before the second arm existed to compare it against.
Model unsloth/Qwen3.5-2B-MTP-GGUF variant UD-Q4_K_XL, loaded with
gpu_layers 99 and confirmed on the card. enabled_tools: ["python"] in the
same sessions executes correctly, so the selection path is specific to this
name rather than broken for every local tool.
Activity