]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
chat : fix reasoning leak with force-opened bare <think> templates (#24674)
authorFrosty40 <redacted>
Mon, 13 Jul 2026 07:45:10 +0000 (02:45 -0500)
committerGitHub <redacted>
Mon, 13 Jul 2026 07:45:10 +0000 (09:45 +0200)
commit91c631b21d6e5d09e9c6659efdf6baeef5a44ddb
tree17e857349a47a0010e494c4fb8cca692a68bd1e1
parentefb3036c1826573c0b151ba428000d07adcb6856
chat : fix reasoning leak with force-opened bare <think> templates (#24674)

* chat : fix reasoning leak with force-opened bare <think> templates

The reasoning start tag inferred from prior turns can carry trailing
whitespace (e.g. <think>\n) while a force-open template prefills a bare
<think>. Trim the tag used for the prefix split so the bare prefill is
matched instead of being swallowed into content.

* chat : fix Nemotron Nano v2 regression

---------

Co-authored-by: Alde Rojas <redacted>
common/chat-auto-parser-generator.cpp
common/chat-diff-analyzer.cpp
tests/test-chat.cpp