mirror of
https://github.com/ollama/ollama.git
synced 2026-04-17 15:53:27 +02:00
We've observed Gemma 4 occasionally emitting extra <tool_call|> tags after a valid tool call. We suppress leading close tags in this immediate post-tool-call state so the extra close tags do not leak into assistant content. The tradeoff is that if the model intentionally begins its next content span with the literal string "<tool_call|>", we will erroneously treat it as noise and drop it.