]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
common : re-arm reasoning budget after DONE on new <think> (#22323)
authorJillis ter Hove <redacted>
Tue, 28 Apr 2026 17:15:36 +0000 (19:15 +0200)
committerGitHub <redacted>
Tue, 28 Apr 2026 17:15:36 +0000 (19:15 +0200)
commit52e5f0a5c180248ffae41fe74060d21a07651a93
tree250f3b426e3e388bd289953c6555075017ca5c1b
parentf9f33654a63d6a39bf6059b4f96c125ded827728
common : re-arm reasoning budget after DONE on new <think> (#22323)

DONE state absorbs all tokens including a new start tag, causing any think blocks after the first to run unbudgeted. Observed on unsloth/Qwen3.6-27B-GGUF which interleaves multiple <think> blocks per response.

Fixed by advancing start_matcher in DONE branch and re-arming to COUNTING with a fresh budget on match. Adds regression test (test-reasoning-budget: test 6).
common/reasoning-budget.cpp
tests/test-reasoning-budget.cpp