Best AI News โ€” Updated Every 3 Hours
Story Page
← All Stories
Home Community Story
Community

I stumbled on a Gemma 4 chat template bug for tools and fixed it

Via r/LocalLlama
Wednesday, Apr 29, 2026 ยท 5:40AM
Summary

TLDR: tool parameters using the common JSON Schema pattern `anyOf: [$ref, null]` are rendered into the prompt as empty `type` fields. This strips the useful schema information before the model sees it. -- Long, rambling version: Gemma 4 was having issues with calling my custom MCP tool on >3 inferen

Continue reading the full article
Read at r/LocalLlama
www.reddit.com
Back to all stories