[Bugfix][Parser] Scope reasoning-end detection to the current turn via turn-boundary tokens (#54089)

Signed-off-by: Mikhail Podvitskii <podvitskiymichael@gmail.com>
This commit is contained in:
Mikhail Podvitskii
2026-08-27 16:57:32 -04:00
committed by GitHub
parent 7d5769b2d9
commit 3a9bfc209f
5 changed files with 147 additions and 4 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ import dataclasses
import functools
from typing import TYPE_CHECKING
from vllm.parser.qwen3 import Qwen3Parser, qwen3_config
from vllm.parser.qwen3 import CHATML_TURN_BOUNDARIES, Qwen3Parser, qwen3_config
if TYPE_CHECKING:
from vllm.entrypoints.openai.chat_completion.protocol import (
@@ -33,7 +33,7 @@ if TYPE_CHECKING:
@functools.cache
def nemotron_v3_config(thinking: bool = True) -> ParserEngineConfig:
return dataclasses.replace(
qwen3_config(thinking=thinking),
qwen3_config(thinking=thinking, turn_boundary_tokens=CHATML_TURN_BOUNDARIES),
name="nemotron_v3",
strip_trailing_reasoning_whitespace=True,
)