Claude Code model router
claude-code-proxy
Proxy translating Claude Code requests to any OpenAI-compatible API.
Install
git clone https://github.com/fuergaosi233/claude-code-proxy.gitFrom the README
Claude Code Proxy A proxy server that enables Claude Code to work with OpenAI-compatible API providers. Convert Claude API requests to OpenAI API calls, allowing you to use various LLM providers through the Claude Code CLI. Features - Full Claude API Compatibility: Complete /v1/messages endpoint support - Multiple Provider Support: OpenAI, Azure OpenAI, local models (Ollama), and any OpenAI-compatible API - Smart Model Mapping: Configure BIG and SMALL models via environment variables - Function Calling: Complete tool use support with proper conversion - Streaming Responses: Real-time SSE streaming support - Image Support: Base64 encoded image input - Custom Headers: Automatic injection of custom HTTP headers for API requests - Error Handling: Comprehensive error handling and logging Quick Start 1. Install Dependencies 2. Configure 3. Start Server 4. Use with Claude Code Configuration The application automatically loads environment variables from a .env file in the project root using python-dotenv. You can also set environment variables directly in your shell. Environment Variables Required: - OPENAI_API_KEY - Your API key for the target provider Security: - ANTHROPIC_API_KEY - Expected Anthropic API key for client validation - If set, clients must provide this exact API key to access the proxy - If not set, any API key will be accepted Model Configuration: - BIG_MODEL - Model for Claude opus requests (default: gpt-4o) - MIDDLE_MODEL - Model for Claude opus requests (default: gpt-4o) - SMALL_MODEL - Model for Claude haiku requests (default: gpt-4o-mini) API Configuration: - OPENAI_BASE_URL - API base URL (default: https://api.openai.com/v1) Server Settings: - HOST - Server host (default: 0.0.0.0) - PORT - Server port (default: 8082) - LOG_LEVEL…
Details
- Repository
- fuergaosi233/claude-code-proxy
- Language
- Python
- License
- MIT
- Last updated
- 12 March 2026
FAQ
What is claude-code-proxy?
Proxy translating Claude Code requests to any OpenAI-compatible API. It is a model router for Claude Code, from fuergaosi233/claude-code-proxy on GitHub.
How do I install claude-code-proxy?
Clone fuergaosi233/claude-code-proxy from GitHub and follow the setup steps in its README.
Is claude-code-proxy popular?
fuergaosi233/claude-code-proxy has 2,803 GitHub stars and 415 forks, and is included in 2 curated Claude Code lists. It was last updated on 12 March 2026.
More model routers & proxies
copilot-api
4.2kericc-ch/copilot-api
Turns a GitHub Copilot subscription into an Anthropic-compatible API that Claude Code can use.
antigravity-claude-proxy
4kbadrisnarayanan/antigravity-claude-proxy
Proxy exposing Antigravity-provided models so Claude Code can use them.
claude-code-proxy
3.8k1rgs/claude-code-proxy
Proxy that lets Claude Code run on OpenAI or Gemini models.
CC Switch CLI
5.4kSaladDay/cc-switch-cli
Command-line version of CC Switch for swapping Claude Code providers and settings.
Opencodex
18klidge-jun/opencodex
Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code
VibeProxy
3.4kautomazeio/vibeproxy
macOS menu bar app that lets other coding tools use your Claude Code subscription without API keys.
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.