Skip to content

Fix Gemma 4 agentic turn rendering#770

Open
rshemet wants to merge 1 commit into
mainfrom
fix/gemma4-chat-template
Open

Fix Gemma 4 agentic turn rendering#770
rshemet wants to merge 1 commit into
mainfrom
fix/gemma4-chat-template

Conversation

@rshemet

@rshemet rshemet commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • align Gemma 4 assistant and tool-response turn closure with Google's updated canonical template
  • continue consecutive assistant messages and completed tool loops within the same model turn
  • add the thought-channel generation primer after terminal tool responses when thinking is enabled
  • add native and Hugging Face golden regression coverage

Testing

  • venv/bin/cactus build --python
  • PYTHONPATH=python venv/bin/python -m pytest python/tests/test_chat_template_golden.py -k gemma4 -q -rs (10 passed)
  • venv/bin/cactus test --component engine --suite llm --model /private/tmp/cactus-gemma4-template-verify-new --backend cpu (13 passed)

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.

1 participant