Claude Code model router

claude-code-proxy

Proxy that lets Claude Code run on OpenAI or Gemini models.

3,767 stars 487 forksModel routers & proxies Source

Install

Install
npm install -g @anthropic-ai/claude-code
From source
git clone https://github.com/1rgs/claude-code-proxy.git

From the README

Anthropic API Proxy for Gemini & OpenAI Models 🔄

Use Anthropic clients (like Claude Code) with Gemini, OpenAI, or direct Anthropic backends. 🤝

A proxy server that lets you use Anthropic clients with Gemini, OpenAI, or Anthropic models themselves (a transparent proxy of sorts), all via LiteLLM. 🌉

Quick Start ⚡

Prerequisites

- OpenAI API key 🔑
- Google AI Studio (Gemini) API key (if using Google provider) 🔑
- Google Cloud Project with Vertex AI API enabled (if using Application Default Credentials for Gemini) ☁️
- uv installed.

Setup 🛠️

From source

1. Clone this repository:

2. Install uv (if you haven't already):

   *(uv will handle dependencies based on pyproject.toml when you run the server)*

3. Configure Environment Variables:
   Copy the example environment file:

   Edit .env and fill in your API keys and model configurations:

   *   ANTHROPIC_API_KEY: (Optional) Needed only if proxying *to* Anthropic models.
   *   OPENAI_API_KEY: Your OpenAI API key (Required if using the default OpenAI preference or as fallback).
   *   GEMINI_API_KEY: Your Google AI Studio (Gemini) API key (Required if PREFERRED_PROVIDER=google and USE_VERTEX_AUTH=true).
   *   USE_VERTEX_AUTH (Optional): Set to true to use Application Default Credentials (ADC) will be used (no static API key required). Note: when USE_VERTEX_AUTH=true, you must configure VERTEX_PROJECT and VERTEX_LOCATION.
   *   VERTEX_PROJECT (Optional): Your Google Cloud Project ID (Required if PREFERRED_PROVIDER=google and USE_VERTEX_AUTH=true).
   *   VERTEX_LOCATION (Optional): The Google Cloud region for Vertex AI (e.g., us-central1) (Required if PREFERRED_PROVIDER=google and USE_VERTEX_AUTH=true).
   *   PREFERRED_PROVIDER (Optional): Set to openai (default), google, or anthropic. This determines the…
Read the full README on GitHub

Details

Language
Python
Last updated
23 June 2026

FAQ

What is claude-code-proxy?

Proxy that lets Claude Code run on OpenAI or Gemini models. It is a model router for Claude Code, from 1rgs/claude-code-proxy on GitHub.

How do I install claude-code-proxy?

Run npm install -g @anthropic-ai/claude-code, then follow the setup in the README.

Is claude-code-proxy popular?

1rgs/claude-code-proxy has 3,767 GitHub stars and 487 forks, and is included in 2 curated Claude Code lists. It was last updated on 23 June 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.