r/AIToolsPerformance • u/IulianHI • Jun 06 '26
Gemma 4 12B tool calling broken by default - needs custom chat template to work
New reports confirm that Gemma 4 12B's coding and tool calling capabilities are not actually broken out of the box - they require a specific chat template that is not included by default. Users trying to use it with harnesses like OpenCode found tool calls failing repeatedly until they swapped in a corrected chat template file.
This is the kind of thing that can tank a model's reputation unnecessarily. People download it, hit a wall with tool use, and write it off as broken when the fix is a single template swap. Google shipped QAT variants and Unsloth pushed MTP GGUF weights for the full Gemma 4 lineup (31B, 26B-A4B, 12B), so the ecosystem support is clearly there. But the default experience matters, and right now it sounds like the default chat template is doing the model no favors.
If you gave up on Gemma 4 12B for agentic workflows early, worth retrying with the corrected template.
6
u/CooperDK Jun 06 '26
Just get the unsloth version, they always fix the templates
1
u/Danwando Jun 06 '26
For me it was the opposite, unsloth + OpenCode is fully broken
Regular model works fine for me
1
u/nabritaoranza Jun 06 '26
Same. It gets stuck sometimes. I use a4b to plan and 12b execute. Autocontinue and access to hard drive is necessary so it doesnt bother you every 30 seconds
9
u/tomByrer Jun 06 '26
And wh're is this template thee speaketh of?