Back to Blog

I Tested Every Gemini Model in Claude Code Router — Here's What Actually Works

By Ayyaz Zafar
Free vs Paid Gemini models in Claude Code Router - Which Actually Works comparison
I spent hours testing every Gemini model inside Claude Code Router — and the results were honestly surprising. Some models worked perfectly, some completely failed, and one model had this really weird bug where the response just disappears right in front of you.

In this article, I'll show you exactly which Gemini models work and which ones don't, along with the exact configuration you need whether you're using the free API key or the paid one.

What is Claude Code Router?

Normally when you use Claude Code, every request goes to Anthropic's API — that costs money, and if you hit the rate limit, you're stuck. Claude Code Router is an open-source tool that sits between Claude Code and whatever AI provider you want to use.

Claude Code thinks it's talking to Anthropic, but actually your request is being silently redirected to Gemini, DeepSeek, or any other provider you configure. This means you get the full Claude Code experience — all the agentic features, all the tools — but powered by a completely different model underneath.

And that includes Google's Gemini models, which have a generous free API tier.

Installation

Installation is just one command. You need Node.js installed first (grab the LTS version from nodejs.org). Then run:

npm install -g claude-code-router

Verify the installation:

ccr -v
# Cloud Code Router version 2.0

If you don't have Claude Code installed yet:

npm install -g @anthropic-ai/claude-code

Starting the Router

Start the router with:

ccr start

You should see a message saying the server is listening. Then open the UI for easy configuration:

ccr ui

The UI makes configuration much easier — you can manage providers, models, and routing rules without editing JSON manually.

Setting Up Gemini as a Provider

  1. Click Add Provider in the left sidebar
  2. Select Gemini from the "Import from Template" dropdown
  3. It auto-fills the name, API URL, and default models (Gemini 2.5 Flash and Gemini 2.5 Pro)
  4. Add your Gemini API key
  5. Keep the transformer set to Gemini (this tells the router how to translate Claude Code's requests into Gemini-compatible format)

Getting Your Gemini API Key

Free API Key

Go to Google AI Studio (aistudio.google.com), sign in with your Google account, and generate an API key. The free tier gives you generous rate limits for testing and personal use.

Paid API Key

For production work, set up a Google Cloud project with billing enabled. The paid tier removes rate limits and provides more stable responses.

Model Testing Results

Here's where it gets interesting. I tested every available Gemini model and here are the results:

Gemini 2.5 Flash (Free API) ✅

This is the default model that comes with the template. It works — it can read files, understand code structure, and give summaries. However, I noticed a disappearing response bug: after the model creates a file or uses tools, the response text just vanishes. The file gets created successfully, but you lose the explanation.

For quick tasks and code reading, Flash on the free tier is usable but has this annoying quirk.

Gemini 2.5 Pro (Free API) ⚠️

Similar results to Flash on the free tier — it works for basic tasks but suffers from the same disappearing response issue after tool use. The quality of responses is noticeably better than Flash, but the instability makes it unreliable for serious work.

Gemini 2.0 Flash (Free API) ❌

This older model had compatibility issues with Claude Code Router's request format. Not recommended.

Gemini 3.1 Pro Preview (Paid API) ✅✅✅

This is the sweet spot. With a paid API key, Gemini 3.1 Pro Preview works flawlessly:

  • Reads files correctly
  • Gives detailed, comprehensive summaries
  • No disappearing responses
  • Tool use works perfectly
  • Generated a polished landing page with animations on the first try

Pro Tip: Background Model Configuration

Keep your background model set to Gemini 2.5 Flash, even when using Pro for your main model. Why? Claude Code fires dozens of invisible requests every session — reading files, checking status, indexing code. If all of those hit the Pro model, you'll burn through your API quota on tasks you never even see.

Flash handles the background work. Pro handles everything you actually type.

Free vs Paid: Landing Page Comparison

To really test the difference, I gave both the free and paid models the same ambitious prompt: create a world-class landing page for a fictional AI startup.

Flash (Free): Produced a functional but basic page. The disappearing response bug made it hard to iterate.

3.1 Pro Preview (Paid): Produced a significantly more polished page with working animations, better design, and more complex layout. The response stayed visible, making iteration smooth.

Is the Paid API Key Worth It?

  • For quick tasks and code reading: Flash on the free tier is fine
  • For production-quality work: Pro on the paid tier is noticeably better
  • For stability: The paid API eliminates the disappearing response bug

Quick Setup Summary

# Install
npm install -g claude-code-router

# Start router
ccr start

# Open configuration UI
ccr ui

# Configure Gemini provider with your API key
# Set main model: Gemini 3.1 Pro Preview (paid) or 2.5 Flash (free)
# Set background model: Gemini 2.5 Flash (always)

# Launch Claude Code through the router
ccr code

Related Articles

]]>

Share this article