Tools
A missing newline before </think> was silently destroying prompt-cache reuse for qwen3-coder in llama.cpp
PR #28869, merged 2026-09-16, forces `\n</think>` rather than bare `</think>` when llama.cpp terminates a reasoning budget for qwen3-coder templates. The old string did not match what the template renders on subsequent requests, so every follow-up request missed the prompt cache. It is a one-character class of bug with a large cost, and the general lesson for anyone injecting forced tokens into a chat template is that the injected text has to be byte-identical to what the template itself would emit.
Source
↳ Follow the thread