`tool_choice: "none"` drops the tools from the prompt, so the prompt cache misses
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- zig
- Ambito
- backend, performance
Direzione di ricerca
Start with zig/src/server/tool_specs.zig and zig/src/server/server.zig, then trace how the DeepSeek-V4.1 template in tools/dsv41-hip/assets/chat_template.jinja renders offered tools and handles DSML calls. Compare the none, named-function, and required paths, and read the “Keeping the prompt cache” section in docs/api.md for current behavior. Done means the chosen behavior preserves the prior prompt while preventing disallowed tool calls; the issue leaves open whether this should be DeepSeek-V4.1-specific or behind a server flag.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
With tool_choice: "none", tool_specs.active (zig/src/server/tool_specs.zig) returns no tools, so the DeepSeek-V4.1
chat template renders no tools block. The template writes that block right after the system text
(tools/dsv41-hip/assets/chat_template.jinja), so the prompt changes near its start, and the kept prompt state from
the turn before can't be resumed: the whole conversation is read again.
With thinking on it changes more: the template keeps earlier turns' thinking only while tools are offered (eff_drop),
so without tools every earlier assistant turn is rendered differently too.
A tool_choice that names one function has the same effect: tool_specs.active returns only that tool, so the tools
block changes.
Why it matters
Agent harnesses send tool_choice: "none" (or leave the tools out) to get a final answer at a step or time limit,
which is when the conversation is longest. Prompt reading runs at about 1,100–1,250 tok/s, so a 131K-token conversation
takes about 108 s on a Ryzen AI Halo pair, and while it reads, every other request on the pair waits (see the issue on
cold reads stalling the pair).
The workaround today is in docs/api.md ("Keeping the prompt cache"): keep the tools offered with tool_choice: "auto"
and say in a message that no more tools will run. That relies on the model following the message.
Ask
"none": keep the offered tools in the rendered prompt and forbid calls while decoding. For"required"on
DeepSeek-V4.1,checkFeaturesinzig/src/server/server.zigalready gives the engine a.callsstructure that holds
the reply to a DSML block."none"would need the reverse: after the think end, never allow the DSML calls opener.- A named function: render every offered tool, as for
"auto", and hold the.callsstructure to the named one.
Both keep the prompt identical to the turn before, so the cache resumes it.
docs/api.md documents the current behaviour ("none hides tools from the template", on every backend), so this
may be better as a DeepSeek-V4.1 change, or behind a server flag, than a change for every family.
- Lingua principale
- Zig
- Stelle
- 76
- Fork
- 9
- Merge medio
- 21h 59m
- PR unite (30g)
- 34
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Shoestring-dev/StrixFold
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Shoestring-dev/StrixFold#70 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
Shoestring-dev/StrixFold#57 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Problem with thinking-loopsAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
Shoestring-dev/StrixFold#39 · 8 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 54/100
Shoestring-dev/StrixFold#7 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Future GLM 5.3 support?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Shoestring-dev/StrixFold#3 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Shoestring-dev/StrixFold
Issue simili
-
bug done
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
neavo/LinguaGacha#1124 ·
I maintainer di solito rispondono entro 1 giorno
-
module/http Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ballerina-platform/ballerina-library#9868 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
symgraph/GhidrAssistMCP#84 ·
I maintainer di solito rispondono entro 2 giorni
-
Command gate: one shared constant for the just-below-1e-9 MoveAxis stop epsilon (ZWO, Bisque)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
open-astro/AlpacaBridge#2606 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
reasons-gate
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
benthomasson/reasonsforge#100 ·
I maintainer di solito rispondono entro 1 giorno