Skip to content

Fix Gemma 4 agentic turn rendering - #769

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

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

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)

@rshemet rshemet closed this Jul 17, 2026
@rshemet
rshemet deleted the codex/gemma4-chat-template-fix branch July 17, 2026 18:05
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