chat: fix handling of space in reasoning markers (#22353)

* chat: fix handling of space in reasoning markers

* fix tests

* whitespace
This commit is contained in:
Piotr Wilkin (ilintar)
2026-04-25 21:24:13 +02:00
committed by GitHub
parent 98dc1418ea
commit dcad77cc3b
3 changed files with 23 additions and 28 deletions
+1 -1
View File
@@ -1331,7 +1331,7 @@ static void test_nemotron_reasoning_detection(testing & t) {
// Check reasoning markers
t.assert_equal("reasoning_start should be '<think>\\n'", "<think>\n", analysis.reasoning.start);
t.assert_equal("reasoning_end should be '</think>'", "</think>", analysis.reasoning.end);
t.assert_equal("reasoning_end should be '\\n</think>\\n'", "\n</think>\n", analysis.reasoning.end);
// Check reasoning mode detection
// Nemotron uses tag-based reasoning; prefill handles the template's forced markers