Claude Code Router is an open-source local proxy that sits between Claude Code and your choice of LLM providers. Instead of being locked into a single provider, you route different types of coding requests to different models — Claude for complex reasoning, DeepSeek for everyday tasks, Ollama for offline work, and Gemini for long-context jobs. The proxy binds to a local port and intercepts all Claude Code API calls, forwarding them according to your routing rules.
The tool supports 8+ providers out of the box: OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, SiliconFlow, and any OpenAI-compatible endpoint. You configure routing rules in a simple JSON file — set a default model, then route specific task types like background operations, thinking, or long-context requests to different providers. Dynamic model switching works mid-session using the /model command in Claude Code.
Installation is straightforward: install via npm globally alongside Claude Code, configure your providers and API keys in ~/.claude-code-router/config.json, and start the proxy. The router handles request and response transformation automatically, translating between provider-specific formats and Claude Code's expected API shape. Environment variable interpolation keeps your API keys secure outside the config file.
For teams, Claude Code Router supports GitHub Actions integration for CI/CD workflows, a plugin system for custom transformers, and API key authentication for shared deployments. The project has 33,000+ GitHub stars and an active community on Discord. It's free and open-source under the MIT license, making it one of the most popular tools in the Claude Code ecosystem for developers who want flexibility without cost overhead.