Skip to content

[Gemma4] Updated chat template, reasoning property#322

Open
bbrowning wants to merge 2 commits intovllm-project:mainfrom
bbrowning:gemma4-chat-template-update
Open

[Gemma4] Updated chat template, reasoning property#322
bbrowning wants to merge 2 commits intovllm-project:mainfrom
bbrowning:gemma4-chat-template-update

Conversation

@bbrowning
Copy link
Copy Markdown

This documents the updated chat template to use with Gemma 4 models for reasoning and/or tool calling that was merged in
vllm-project/vllm#39027 .

It also adds instructions for how to enable thinking by default, if a user prefers to always think.

And, it replaces the deprecated reasoning_content field with the updated reasoning field.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Gemma 4 documentation to reflect the change from reasoning_content to reasoning in the API response and adds instructions for using the optimized chat template for reasoning and tool calling. A formatting issue was identified in the key metrics table where a row was missing its closing pipe and third column, which would cause rendering errors.

This documents the updated chat template to use with Gemma 4 models for
reasoning and/or tool calling that was merged in
vllm-project/vllm#39027 .

It also adds instructions for how to enable thinking by default, if a
user prefers to always think.

And, it replaces the deprecated `reasoning_content` field with the
updated `reasoning` field.

Signed-off-by: Ben Browning <bbrownin@redhat.com>
@bbrowning bbrowning force-pushed the gemma4-chat-template-update branch from d0edace to a0b6011 Compare April 8, 2026 22:14
Copy link
Copy Markdown
Collaborator

@faradawn faradawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bbrowning, thanks for the PR! Do you know which version of vLLM incorporates this change? So that we can add a
▎ Note: The reasoning field requires vLLM >= X.Y.Z. On older versions, use reasoning_content.

@faradawn
Copy link
Copy Markdown
Collaborator

faradawn commented Apr 9, 2026

We have just merged a pull request, can you update your branch? Then It looks great to me.

@bbrowning
Copy link
Copy Markdown
Author

Hey @bbrowning, thanks for the PR! Do you know which version of vLLM incorporates this change? So that we can add a ▎ Note: The reasoning field requires vLLM >= X.Y.Z. On older versions, use reasoning_content.

@faradawn vLLM v0.16.0 moved to reasoning instead of reasoning_content. But, Gemma 4 models weren't supported until vLLM v0.19.0. So, I think in the context of the Gemma 4 docs, there's no reason to ever mention reasoning_content as an input/output field. Anyone using Gemma 4 models is on a new enough vLLM to use reasoning instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants