DEV Community

Platypus
Platypus

Posted on

My Claude Code is Getting Gemini 2.5 Pro

Feeling like your AI coding assistant has been slacking off lately? Yeah, I'm talking to you, Claude Code user.
Once upon a time, I was a die-hard Claude Code fan.

But recently, Anthropic pulled a fast one. Claude Code now has a much stricter paywall and usage policy. Even if you pay up, you're not guaranteed great service. For example, the Pro plan (around $20/month) is usable, but it has request limits and doesn't even let you use their top-tier Opus model.

To unlock the better models and higher limits, you have to shell out for the Max plan, and that price tag is... something else. For developers like us who love freedom (and free stuff), having to count your requests every time you want the AI to do some work? It's a total drag!

But hey, where there's a will, there's a way.

I'm going to pull a little switcheroo. Instead of hitting the official servers, I'll redirect the requests to a more powerful and open model, like Google's newly released Gemini 2.5 Pro. How sweet would that be?

Today, I'll walk you through, step-by-step, how to use the local dev powerhouse ServBay and an open-source proxy script to get your Claude Code running for free, at full throttle, and powered by Gemini 2.5 Pro!

Alright, make way, I'm about to work some magic.

Step 1: A Coder's Best Friend — ServBay

First, you need a stable, isolated, and powerful local environment. ServBay is a no-brainer for this.

It's an integrated development environment that lets you easily manage packages like Python, Node.js, PHP, and databases, so you can say goodbye to tedious environment setup. You're basically the king, summoning whichever language you desire, and they can't refuse!

If you don't have it installed, head over to the official website at https://www.servbay.com and download it now. Think of it as your command center; without it, your whole empire will fall into chaos.

Step 2: Summoning Python and Node.js in ServBay

Our proxy script needs a Python environment, and Claude Code itself is built on Node.js.

Sounds complicated, but with ServBay, you don't have to touch any configurations. Just a few clicks and you're done.

  1. Open the ServBay client.
  2. Find "Package" in the left-hand navigation bar.
  3. In the list, find Python, pick a new version like 3.13, and click the green button on the right to install it.

  1. Do the same for Node.js.

You don't have to do anything else. Just sit back and watch.

Step 3: Get Your Gemini Golden Ticket — The API Key

To call the Gemini model, you need an API Key. You can get one for free from the Google AI Studio page:
https://aistudio.google.com/apikey

Log in with your Google account, create a new API key, and copy the key string.

Heads up: This key is super important. Don't share it with anyone!

Step 4: Clone the Code for Our Grand Heist

Next, we'll clone the open-source project claude-code-proxy from GitHub.
claude-code-proxy acts as a middleman, translating the requests from Claude Code into a language that Gemini can understand.

Open the terminal/, navigate to the web root directory that ServBay has set up for us, and run the clone command:

cd /Applications/ServBay/www
git clone https://github.com/ServBay/claude-code-proxy
cd claude-code-proxy
Enter fullscreen mode Exit fullscreen mode

Step 5: Configure Our Secret Weapon

Once the clone is complete, we need to do some simple configuration for the proxy service.

Copy the config file: The project has a template file named .env.example. Let's copy it and rename the copy to .env.

cp .env.example .env
Enter fullscreen mode Exit fullscreen mode

Tweak the settings: Open the .env file with your favorite editor and change the following lines:

# Replace this with the Gemini API Key you just got
GEMINI_API_KEY="AIzaSyXXXXXXXXXXXXXXXXXXXXXXX"

# Tell the proxy we prefer Google's models
PREFERRED_PROVIDER="google"

# For our "Big" model, let's use the coveted Gemini 2.5 Pro
BIG_MODEL="gemini-2.5-pro"

# For our "Small" model, a lighter, faster Flash version will do
SMALL_MODEL="gemini-2.5-flash"
Enter fullscreen mode Exit fullscreen mode

Step 6: Fire It Up!

The project author was kind enough to provide automation scripts, so all we have to do is run them.

Run the setup script: This script will automatically install the Python virtual environment tool uv, install Claude Code globally, and configure your zsh environment.

./setup.sh
Enter fullscreen mode Exit fullscreen mode

Wait for the installation messages to finish. If there are no errors, step one was a success.

Start the proxy service:

./run-server.sh
Enter fullscreen mode Exit fullscreen mode

When you see output similar to this, it means our proxy service is up and running locally!

INFO:     
Uvicorn running on http://127.0.0.1:8082 (Press CTRL+C to quit)
Enter fullscreen mode Exit fullscreen mode

Step 7: The Moment of Truth

The stage is set. Let's see if our magic trick worked!

  • IMPORTANT: Open a new terminal window! This ensures your terminal loads the new PATH configured by the setup.sh script, so it can find the claude command.
  • Create a new project: Let's create a small project to test the waters.
cd /Applications/ServBay/www
mkdir servbay-email-list
cd servbay-email-list
Enter fullscreen mode Exit fullscreen mode
  • Summon Claude (Now Powered by Gemini): In your project directory, just run the claude command.
claude
Enter fullscreen mode Exit fullscreen mode
  • Give it a command: Now you can chat with Claude Code just like before, but the powerhouse working behind the scenes is Gemini 2.5 Pro. Let's give it a real-world task:

Generate an HTML file for a notification email that ServBay can send to users. The CSS must be inlined in the HTML. Do not reference any external CSS or JS files, and don't use any CSS/JS frameworks. Use an SVG placeholder for the logo for now. Make sure there is a clear unsubscribe link at the bottom, as well as ServBay's social media icons and links.

Hit Enter and wait a moment…

Boom! Gemini 2.5 Pro, via our proxy, will generate a complete HTML file that meets all your requirements directly in your project directory. You can open it immediately to see how it looks. Now that's a sweet feeling!

In Conclusion

With the ServBay + claude-code-proxy one-two punch, we've successfully hooked up the slick front-end of Claude Code to the powerful brain of Gemini 2.5 Pro. Not only did we bypass the original paywall and usage limits, but we also got to use one of today's top-tier large models for free. Feels like you just saved a million bucks, doesn't it?

Now you can have your AI workhorse write code, fix bugs, generate projects, and explain concepts to your heart's content. There are no limits but your own imagination. Go give it a try and see what it feels like to have a tireless AI assistant at your beck and call.

Top comments (0)