Claude Code Router screenshot

Claude Code Router

DeveloperApplicationFree

Claude Code Router - Route Claude Code to Any LLM Provider

Last updated Apr 29, 2026

Claim Tool

What is Claude Code Router?

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.

Claude Code Router's Top Features

Key capabilities that make Claude Code Router stand out.

Model routing to different LLM providers based on task type

Multi-provider support: OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, SiliconFlow

Request/response transformation between provider formats

Dynamic model switching with /model command mid-session

CLI model management with ccr model commands

GitHub Actions integration for CI/CD workflows

Plugin system for custom transformers

Environment variable interpolation for secure API key management

API key authentication for shared deployments

Dual logging system with pino HTTP logs and application-level logs

Use Cases

Who benefits most from this tool.

Tags

claude-codellm-proxyopen-sourcemodel-routingdeepseekollamaopenroutergeminiapi-proxydeveloper-tools

Claude Code Router's Pricing

Free plan available

User Reviews

Share your thoughts

If you've used this product, share your thoughts with other builders

Recent reviews

Frequently Asked Questions

Is Claude Code Router free to use?
Yes, Claude Code Router is free and open-source under the MIT license. You only pay for the LLM API usage from your chosen providers.
Which LLM providers does Claude Code Router support?
It supports Anthropic, OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, SiliconFlow, and any OpenAI-compatible API endpoint. You can also add custom providers through the plugin system.
Can I switch models mid-conversation in Claude Code?
Yes, use the /model command within Claude Code to dynamically switch between configured providers without restarting your session.
How do I keep my API keys secure?
Claude Code Router supports environment variable interpolation in config.json using $VAR_NAME or ${VAR_NAME} syntax, so your keys never need to be stored in the configuration file directly.