Skip to content

Fix Gemma tool declaration echoes#756

Open
h30s wants to merge 1 commit into
cactus-compute:mainfrom
h30s:fix-gemma4-tool-declaration-echo
Open

Fix Gemma tool declaration echoes#756
h30s wants to merge 1 commit into
cactus-compute:mainfrom
h30s:fix-gemma4-tool-declaration-echo

Conversation

@h30s

@h30s h30s commented Jul 9, 2026

Copy link
Copy Markdown

#Fixes #693

Changes:

  • Blocks Gemma tool declaration echo paths when tools are present.
  • Preserves optional tool behavior unless force_tools is true.
  • Keeps full grammar forcing for force_tools=true.
  • Tightens LLM tests so empty function_calls no longer pass.

Validation:

  • git diff --check
  • Local branch-logic simulation passed.
  • Could not run cactus test --suite llm locally because this machine/toolchain is x86 while cactus-kernels requires ARM NEON flags/headers.

Reviewer request:
Please run cactus test --suite llm on an ARM/Gemma4 setup and confirm tool cases produce non-empty function_calls and no <|tool>declaration: echo."

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.

Gemma4 tool-calling emits declaration-format echoes instead of <|tool_call> (function_calls always empty)

1 participant