Claude Code Router has been installed and configured for your project.
The router is configured with multiple AI models via OpenRouter for different tasks:
- default: GPT-5 (standard requests)
- webSearch: Gemini 2.5 Flash Lite (web searches)
- background: GPT OSS 20B (background tasks)
- longContext: Gemini 2.5 Pro (documents > 100k tokens)
- think: Claude Opus 4.1 (complex reasoning)
Automatically switches to longContext model when input exceeds 100,000 tokens.
To use the router, add your OpenRouter API key to .env:
OPENROUTER_API_KEY="your-openrouter-api-key"Get your API key at: https://openrouter.ai/keys
-
Start the router:
./start-router.sh
-
In Claude Code, switch models dynamically:
/model webSearch # Switch to Gemini 2.5 Flash Lite /model think # Switch to Claude Opus 4.1 /model background # Switch to GPT OSS 20B /model longContext # Switch to Gemini 2.5 Pro /model default # Back to GPT-5
claude-code-router.config.json- Router configurationstart-router.sh- Startup script.env- API keys (add your keys)
- Add your OpenRouter API key to
.env - Run
./start-router.shto start the router - Use
/model <route>in Claude Code to switch models
- Ensure OPENROUTER_API_KEY is set in
.env - Check router is running:
ps aux | grep claude-code-router - View logs for debugging if needed