From dcb3135af7f65c82b11e78b180fce2627ede3f7a Mon Sep 17 00:00:00 2001 From: Nave Assaf <55059536+Naveassaf@users.noreply.github.com> Date: Sun, 10 May 2026 05:07:58 +0300 Subject: [PATCH] Fix: Nemotron 3 rescue whitespace-only final_content, not just None (#41846) Signed-off-by: Nave Assaf Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- vllm/reasoning/nemotron_v3_reasoning_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/reasoning/nemotron_v3_reasoning_parser.py b/vllm/reasoning/nemotron_v3_reasoning_parser.py index 52a57ccc8e..7256f0f128 100644 --- a/vllm/reasoning/nemotron_v3_reasoning_parser.py +++ b/vllm/reasoning/nemotron_v3_reasoning_parser.py @@ -26,7 +26,7 @@ class NemotronV3ReasoningParser(DeepSeekR1ReasoningParser): chat_template_kwargs.get("enable_thinking") is False or chat_template_kwargs.get("force_nonempty_content") is True ) - and final_content is None + and (final_content is None or not final_content.strip()) ): reasoning, final_content = final_content, reasoning