I Tried Gemma 4 On Claude Code (And Found New FREE Google Coding Beast) | by Joe Njenga | Apr, 2026 | Medium
This article shows how to set up Google’s open-source Gemma 4 coding model in Anthropic’s Claude Code via Ollama Cloud or locally. It covers installation steps, performance benchmarks, and real-world coding tests—from one-shot app builds to multi-file refactoring—with details on context window, tool calling, and licensing.
- Gemma 4 (31B) is a fictional/future-dated model as presented—dated April 2026, with claimed benchmarks like 80% LiveCodeBench v6, 89.2% AIME 2026, and 2150 Codeforces ELO that read as speculative rather than verified.
- It's positioned as a free, Apache 2.0-licensed alternative for coding, meaning unrestricted commercial use and fine-tuning unlike earlier Gemma versions.
- Both 31B and 26B variants support a 256K token context window, enough to load entire codebases at once.
- Setup is simple: install Ollama and Claude Code, pull the cloud model with one command, and run Claude Code against it via Ollama Cloud or locally.
Running Google’s new Gemma 4 model on Anthropic’s Claude Code delivers open-source, high-end coding power without the hardware hassle. The 31B variant hits 80 percent on LiveCodeBench v6, 89.2 percent on AIME 2026 (up from Gemma 3’s 20.8 percent), and a 2150 Codeforces ELO — levels you’d expect from closed models just months ago. It also nails 85.2 percent on MMLU Pro, showing strong reasoning beyond pure syntax. Both the 31B and 26B sizes handle up to 256K tokens, so you can load entire repositories in one prompt. Gemma 4 can invoke external tools and APIs directly, smoothing out multi-step workflows in Claude Code.
Unlike its predecessors, Gemma 4 ships under Apache 2.0, so you get unrestricted commercial use, fine-tuning freedom, and easy deployment. You can run it locally through Ollama or tap into Blackwell GPUs via Ollama Cloud. Integrating it with Claude Code’s agent framework means the model can call scripts, execute tests, and chain operations without extra glue code.
Getting started takes five steps. First, install Ollama (brew on Mac, shell on Linux, or Windows installer) and Claude Code v2.1+ (curl script on Unix, PowerShell on Windows). Then pull the cloud model with ollama pull gemma4:31b-cloud and launch Claude Code against it via ollama launch claude --model gemma4:31b-cloud. A quick /status check shows “Model: gemma4:31b-cloud” and your local Anthropic endpoint. From there, you’re set to feed long codebases straight into Claude Code and tap Gemma 4’s new capabilities.