@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 58b2e89642
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

[Bugfix][Gemma4] Render reasoning on assistant turns without tool_calls (#45867)

Signed-off-by: Luciano Martins <lucianommartins@users.noreply.github.com> Co-authored-by: Luciano Martins <lucianommartins@users.noreply.github.com>

Luciano Martins committed Jun 17, 2026 at 17:44 UTC 58b2e896423ffb255fa8b3a2c6b283dd99d7dbad
1 file changed +2 -2
examples/tool_chat_template_gemma4.jinja
+2 -2
@@ -231,10 +231,10 @@
231 {%- endif -%}
232 {%- endif -%}
233
234 - {#- Render reasoning/reasoning_content as thinking channel (tool-call turns only) -#}
234 + {#- Render reasoning/reasoning_content as thinking channel -#}
235 {%- set thinking_text = message.get('reasoning') or message.get('reasoning_content') -%}
236 {%- set thinking_gate = (loop.index0 > ns_turn.last_user_idx) or preserve_thinking -%}
237 - {%- if thinking_text and thinking_gate and message.get('tool_calls') -%}
237 + {%- if thinking_text and thinking_gate -%}
238 {{- '<|channel>thought\n' + thinking_text + '\n<channel|>' -}}
239 {%- endif -%}
240