🚀 v2.4.4 - Multi-provider Claude Code routing with GLM-5, Claude Pro, DeepSeek & more!
Use Claude Code as a single interface to access multiple AI providers with intelligent routing for optimal performance, cost, and quality.
# 1. Install npm install -g @halilertekin/claude-code-router-config # 2. Configure API keys in ~/.env export GLM_API_KEY="your_key" # 3. Use with Claude Code glm # → z.ai GLM-4.7 (Coding Plan) glm5 # → z.ai GLM-5 (Coding Plan) glmapi # → z.ai GLM-5 (API Credits) claude-pro # → Anthropic Claude Pro deepseek # → DeepSeek
| Alias | Provider | Endpoint | Model | Best For |
|---|---|---|---|---|
glm |
z.ai | Coding Plan | GLM-4.7 | Pro subscription coding |
glm5 |
z.ai | Coding Plan | GLM-5 | Max users, complex tasks |
glmapi |
z.ai | API Credits | GLM-5 | Pay-per-use (30$ bakiye) |
claude-pro |
Anthropic | Official | Claude Sonnet 4.5 | Premium coding |
deepseek |
DeepSeek | Anthropic API | deepseek-chat | Budget coding |
minimax / mm |
MiniMax | Anthropic API | M2.5 | Long context |
npm install -g @halilertekin/claude-code-router-config source ~/.zshrc
git clone git@github.com:halilertekin/CC-RouterMultiProvider.git ~/code/claude-code-router-configThen add to ~/.zshrc:
[[ -f "$HOME/code/claude-code-router-config/cli/ccc.zsh" ]] && source "$HOME/code/claude-code-router-config/cli/ccc.zsh"
Add to ~/.env:
# z.ai (GLM) - https://z.ai/apikeys export GLM_API_KEY="your_zai_key" # Anthropic Claude Pro - https://console.anthropic.com/settings/keys export ANTHROPIC_API_KEY="your_anthropic_key" # DeepSeek - https://platform.deepseek.com/ export DEEPSEEK_API_KEY="your_deepseek_key" # MiniMax - https://platform.minimax.io/ export MINIMAX_API_KEY="your_minimax_key" # OpenAI - https://platform.openai.com/api-keys export OPENAI_API_KEY="your_openai_key" # Gemini - https://aistudio.google.com/apikey export GEMINI_API_KEY="your_gemini_key"
# GLM via Coding Plan (subscription) glm # GLM via API Credits (pay-per-use) glmapi # Official Claude Pro claude-pro # DeepSeek deepseek
glm "write a React component" glmapi --print "explain this code" claude-pro --dangerous-skip-install
- Website: https://z.ai
- Models: GLM-5 (recommended for max users), GLM-4.7, GLM-4.5
- Endpoints:
- Coding Plan:
https://api.z.ai/api/coding/paas/v4 - API Credits:
https://api.z.ai/api/paas/v4
- Coding Plan:
- Pricing: Very competitive, 3x usage with Coding Plan
- Note: For maximum users/capacity, use GLM-5 as documented in official z.ai docs
- Website: https://www.anthropic.com/claude
- Models: Claude Sonnet 4.5, Claude Opus 4.5, Claude Haiku
- Access: Use
claude loginor API key
- Website: https://www.deepseek.com
- Models: deepseek-chat, deepseek-coder
- Pricing: Very affordable
- Website: https://www.minimax.io
- Models: M2.5, M2, M1
- Endpoint:
https://api.minimax.io/anthropic - Features: Ultra-long context (200k+ tokens), very competitive pricing
For intent-based routing with automatic model selection:
ccr start # Start router ccr code # Start Claude Code with router ccr status # Check status ccr benchmark # Benchmark providers
ccr config template performance-optimized # Fastest ccr config template cost-optimized # Cheapest ccr config template quality-focused # Best quality
ccr analytics today --detailed
ccr ui # Web dashboard- 📚 Claude Code Optimization Guide NEW!
- Token optimization tips (25-35% savings)
- Best practices for CLAUDE.md
- Model selection strategies
- Applied optimizations for v2.4.3
- Check
~/.envfile exists and has the key - Run
source ~/.zshrcor restart terminal
- Verify API key is valid
- Check quotas/balance
This package follows security best practices:
- Automated scanning: Dependabot monitors dependencies
- Zero vulnerabilities: All reported issues are patched promptly
- Version 2.4.4: All security advisories resolved
# Check for updates npm outdated -g @halilertekin/claude-code-router-config # Update to latest npm update -g @halilertekin/claude-code-router-config
- API keys stored in
~/.env(never in code) .envis gitignored by default- Keys are loaded securely with shell source
- ✅ All vulnerabilities fixed in v2.4.4
- See Security Advisories
MIT © Halil Ertekin
Claude Code adds an attribution header to every request that causes the full prompt to be reprocessed each time, leading to faster token depletion. To disable this:
# Add to ~/.claude/settings.json { "env": { "CLAUDE_CODE_ATTRIBUTION_HEADER": "0" } }
Aşağıdaki üçüncü parti agent ve skill'leri Claude Code'a ekleyebilirsin:
K-Dense-AI/claude-scientific-skills - 140+ bilimsel skill
# Claude Code'da çalıştır:
/plugin marketplace add K-Dense-AI/claude-scientific-skills
/plugin install scientific-skills@claude-scientific-skillsKapsam: Bioinformatics, Drug Discovery, Clinical Research, ML/AI, Data Analysis
alirezarezvani/claude-code-aso-skill - ASO agent sistemi
git clone https://github.com/alirezarezvani/claude-code-aso-skill.git cp .claude/agents/aso/*.md ~/.claude/agents/
Kapsam: Keyword research, metadata optimization, pre-launch checklist
rudrankriyam/app-store-connect-cli-skills - iOS deployment otomasyonu
npx skills add rudrankriyam/app-store-connect-cli-skills
Kapsam: Build, TestFlight, metadata upload, submission, signing
MiniMax M2.5 kullanarak PR'ları otomatik inceleyen bot kurulumu:
- OpenRouter'da MiniMax endpoint al
- GitHub Action oluştur (.github/workflows/auto-refactor.yml):
name: Auto-Refactor Bot on: [pull_request] jobs: refactor: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - name: Run Auto-Refactor run: | # PR diff'ini al git diff main...HEAD --name-only > changed_files.txt # MiniMax'e gönder (refactor önerileri) curl -X POST https://openrouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer $OPENROUTER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "minimax/MiniMax-M2.5", "messages": [{"role": "user", "content": "Bu kodları incele ve refactor/optimizasyon önerilerini listele."}] }' env: OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
- Secret ekle: OpenRouter API key'i GitHub secrets'a ekle
- PR açılır → GitHub Action tetiklenir
- Bot değişiklikleri analiz eder
- MiniMax M2.5'e gönderir
- Refactor önerisi varsa commit atar
- Değişiklik yoksa herhangi bir şey yapmaz
Maliyet: ~0ドル.001/analiz (çok ucuz!)
If you find this useful, please give it a ⭐ on GitHub!