Fix: Nemotron 3 rescue whitespace-only final_content, not just None (#41846)

Signed-off-by: Nave Assaf <nassaf@nvidia.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Nave Assaf
2026-05-10 02:07:58 +00:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent bc5fdc1e6a
commit dcb3135af7
@@ -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