Ollama – v0.20.3: model/parsers: add gemma4 tool call repair (#15374)

Ollama – v0.20.3: model/parsers: add gemma4 tool call repair (#15374)

Ollama v0.20.3 is officially live! 🚀

If you’ve been running large language models locally on your machine, you know that Ollama is the gold standard for making LLMs like Llama 3, DeepSeek-R1, and Mistral accessible without needing a massive cloud setup. This latest update is a huge win for anyone building agentic workflows or using tool-calling capabilities.

What’s new in this release:

  • Gemma 4 Tool Call Repair: We’ve all seen it—a model makes a tiny syntax mistake while trying to call a function, and the whole process grinds to a halt. This update introduces a specialized “repair” mechanism for Gemma 4. If the initial strict parse fails, Ollama will now attempt to fix common errors on the fly to keep your automation running smoothly.
  • Smart Error Correction: The new repair logic is specifically tuned to catch and fix:
  • Missing string delimiters.
  • Incorrectly used single-quoted values.
  • Raw terminal strings that need proper formatting according to the tool schema.
  • Missing object closing braces (applied after a successful concrete repair).
  • Improved Stability & Testing: To make sure these fixes don’t cause new headaches, this release includes expanded regression coverage and new unit tests specifically for malformed tool calls.

This is a massive step forward for reliability when working with cutting-edge models locally. Get updated and keep those agents running! 🛠️

🔗 View Release