Skip to content

Commit 2ff69a5

Browse files
committed
feat: MiniMax desteği ve README güncellemesi
- cli/ccc.zsh: minimax/mm alias eklendi (M2.5) - README.md: Tamamen yenilendi, tüm provider'lar eklendi - .env.example: MINIMAX_API_KEY eklendi
1 parent 91e160b commit 2ff69a5

3 files changed

Lines changed: 163 additions & 158 deletions

File tree

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ QWEN_API_KEY=sk-...
1616
# Zhipu GLM (Z.ai) - https://z.ai/apikeys
1717
GLM_API_KEY=...
1818

19+
# MiniMax - https://platform.minimax.io/
20+
MINIMAX_API_KEY=...
21+
1922
# OpenRouter (fallback)
2023
OPENROUTER_API_KEY=sk-or-...
2124

README.md

Lines changed: 136 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -1,224 +1,203 @@
11
# Claude Code Router Config - Advanced Multi-Provider Setup
22

3-
🚀 **v2.2.0** - GLM-5 Support with Coding Plan & API Credit endpoints!
3+
🚀 **v2.3.0** - Multi-provider Claude Code routing with GLM-5, Claude Pro, DeepSeek & more!
44

55
Use Claude Code as a single interface to access multiple AI providers with intelligent routing for optimal performance, cost, and quality.
66

7-
## ✨ New in v2.0.9
8-
- `glm`/`glm-ccr` print mode disables attachments to avoid EMFILE (too many open files) watcher errors.
9-
10-
Includes all v2.0.8 improvements:
11-
- UI üzerinden `.env` anahtarları ekleme/güncelleme (TR/NL).
12-
- `~/.env` otomatik yükleme ile API anahtarlarının bulunması (CLI + health monitor).
13-
- **z.ai Support**: Native integration for GLM-4.7 via z.ai (PPInfra).
14-
- **Lightweight Mode**: New `ccc` function for zero-dependency routing.
15-
- **Direct GLM Alias**: `glm` now launches GLM-4.7 directly via z.ai; `glm-ccr` keeps router mode.
16-
- **Non-interactive install**: CI-friendly installer flags and env controls.
17-
- **Unified router**: Built-in router service, no external dependency required.
18-
- **UI refresh**: Daha sade ve responsive tasarım, TR/NL dil desteği.
19-
20-
## 🚀 Setup on Another Machine (Fastest Way)
21-
22-
If you just want to use the `ccc` command (Claude Code Commander) and `glm` alias without installing the full Node.js router stack:
23-
24-
1. **Clone the repo:**
25-
```bash
26-
mkdir -p ~/code
27-
git clone git@github.com:halilertekin/CC-RouterMultiProvider.git ~/code/claude-code-router-config
28-
```
29-
30-
2. **Source the script in your `.zshrc`:**
31-
Add this line to your `~/.zshrc`:
32-
```bash
33-
[[ -f "$HOME/code/claude-code-router-config/cli/ccc.zsh" ]] && source "$HOME/code/claude-code-router-config/cli/ccc.zsh"
34-
```
35-
36-
3. **Configure Keys:**
37-
Create `~/.env` or `~/.ccm_config` with your keys:
38-
```bash
39-
export GLM_API_KEY="your_zai_key_here"
40-
export DEEPSEEK_API_KEY="your_deepseek_key_here"
41-
```
42-
43-
4. **Reload & Run:**
44-
```bash
45-
source ~/.zshrc
46-
glm # Launches GLM-5 via z.ai Coding Plan
47-
glmapi # Launches GLM-5 via z.ai API Credits
48-
ccc ds # Launches DeepSeek
49-
ccc claude # Launches Official Claude (Pro)
50-
```
7+
## ✨ Quick Start
518

52-
---
9+
```bash
10+
# 1. Install
11+
npm install -g @halilertekin/claude-code-router-config
12+
13+
# 2. Configure API keys in ~/.env
14+
export GLM_API_KEY="your_key"
5315

54-
## Features
16+
# 3. Use with Claude Code
17+
glm # → z.ai GLM-5 (Coding Plan)
18+
glmapi # → z.ai GLM-5 (API Credits)
19+
claude-pro # → Anthropic Claude Pro
20+
deepseek # → DeepSeek
21+
```
5522

56-
- **Node.js 16+ Support**: Compatible with modern Node.js environments
57-
- **7 Provider Support**: OpenAI, Anthropic, Gemini, Qwen, GLM, OpenRouter, GitHub Copilot
58-
- **Smart Intent-Based Routing**: Automatically selects the best model based on your request
59-
- **Advanced CLI Tools**: Test, benchmark, analyze, and monitor your setup
60-
- **Analytics & Cost Tracking**: Detailed insights into usage and spending
61-
- **Configuration Templates**: Pre-optimized setups for different use cases
62-
- **Health Monitoring**: Real-time provider status and automatic failover
63-
- **Enhanced Logging**: Detailed logs with metrics and performance data
23+
---
6424

65-
## Routing Strategy
25+
## 📋 Available Aliases
6626

67-
| Request Type | Provider | Model |
68-
|--------------|----------|-------|
69-
| Code writing, debugging | OpenAI | gpt-4o |
70-
| Deep analysis, architecture | Anthropic | claude-sonnet-4 |
71-
| Quick responses, summaries | Gemini | gemini-2.5-flash |
72-
| Simple tasks | Qwen | qwen-plus |
73-
| Translation, multilingual | GLM | glm-4.7 (z.ai) |
74-
| Complex algorithms | OpenAI | o1 |
75-
| Coding assistance | GitHub Copilot | copilot |
27+
| Alias | Provider | Endpoint | Model | Best For |
28+
|-------|----------|----------|-------|----------|
29+
| `glm` | z.ai | Coding Plan | GLM-5 | Subscription coding |
30+
| `glmapi` | z.ai | API Credits | GLM-5 | Pay-per-use |
31+
| `claude-pro` | Anthropic | Official | Claude Sonnet 4.5 | Premium coding |
32+
| `deepseek` | DeepSeek | Anthropic API | deepseek-chat | Budget coding |
33+
| `minimax` / `mm` | MiniMax | Anthropic API | M2.5 | Long context |
7634

77-
## Installation (Full Router)
35+
---
7836

79-
### Option 1: PNPM (Recommended)
37+
## 🚀 Installation
8038

81-
Use this if you want the full routing capabilities (benchmarking, analytics, etc).
39+
### Option 1: NPM (Recommended)
8240

8341
```bash
84-
pnpm add -g @halilertekin/claude-code-router-config
85-
# System is ready! Run: ccr --help
42+
npm install -g @halilertekin/claude-code-router-config
43+
source ~/.zshrc
8644
```
8745

88-
Then run the installer to copy config files:
46+
### Option 2: Manual
8947

9048
```bash
91-
ccr-setup
49+
git clone git@github.com:halilertekin/CC-RouterMultiProvider.git ~/code/claude-code-router-config
9250
```
9351

94-
Non-interactive usage (CI):
95-
52+
Then add to `~/.zshrc`:
9653
```bash
97-
CCR_CONFIG_NO_PROMPT=1 ccr-setup
98-
CCR_CONFIG_OVERWRITE=1 ccr-setup
99-
# or
100-
ccr-setup --overwrite
54+
[[ -f "$HOME/code/claude-code-router-config/cli/ccc.zsh" ]] && source "$HOME/code/claude-code-router-config/cli/ccc.zsh"
10155
```
10256

103-
### Option 2: Manual Setup
57+
---
10458

105-
#### 1. Copy Configuration Files
59+
## 🔑 API Key Setup
60+
61+
Add to `~/.env`:
10662

10763
```bash
108-
mkdir -p ~/.claude-code-router
109-
cp config/config.json ~/.claude-code-router/
110-
cp config/intent-router.js ~/.claude-code-router/
111-
cp config/smart-intent-router.js ~/.claude-code-router/
64+
# z.ai (GLM) - https://z.ai/apikeys
65+
export GLM_API_KEY="your_zai_key"
66+
67+
# Anthropic Claude Pro - https://console.anthropic.com/settings/keys
68+
export ANTHROPIC_API_KEY="your_anthropic_key"
69+
70+
# DeepSeek - https://platform.deepseek.com/
71+
export DEEPSEEK_API_KEY="your_deepseek_key"
72+
73+
# MiniMax - https://platform.minimax.io/
74+
export MINIMAX_API_KEY="your_minimax_key"
75+
76+
# OpenAI - https://platform.openai.com/api-keys
77+
export OPENAI_API_KEY="your_openai_key"
78+
79+
# Gemini - https://aistudio.google.com/apikey
80+
export GEMINI_API_KEY="your_gemini_key"
11281
```
11382

114-
#### 2. Set Up Environment Variables
83+
---
84+
85+
## 💻 Claude Code Usage
11586

116-
Create `.env` file:
87+
### Direct Aliases
11788

11889
```bash
119-
cp .env.example ~/.env
120-
# Edit ~/.env with your API keys
90+
# GLM via Coding Plan (subscription)
91+
glm
92+
93+
# GLM via API Credits (pay-per-use)
94+
glmapi
95+
96+
# Official Claude Pro
97+
claude-pro
98+
99+
# DeepSeek
100+
deepseek
121101
```
122102

123-
#### 3. Start Router
103+
### With Arguments
124104

125105
```bash
126-
source ~/.zshrc
127-
node router/server.js
106+
glm "write a React component"
107+
glmapi --print "explain this code"
108+
claude-pro --dangerous-skip-install
128109
```
129110

130-
## API Key Setup
111+
---
131112

132-
| Provider | Link | Notes |
133-
|----------|------|-------|
134-
| OpenAI | https://platform.openai.com/api-keys | gpt-4o, o1 models |
135-
| Anthropic | https://console.anthropic.com/settings/keys | Claude models |
136-
| Gemini | https://aistudio.google.com/apikey | Google AI models |
137-
| Qwen | https://dashscope.console.aliyun.com/apiKey | Alibaba Cloud |
138-
| GLM (z.ai) | https://open.bigmodel.cn/usercenter/apikeys | Zhipu AI / z.ai |
139-
| OpenRouter | https://openrouter.ai/keys | Multiple models |
140-
| GitHub Copilot | https://github.com/settings/tokens | `copilot` scope |
113+
## 🏢 Provider Details
141114

142-
## Configuration Templates
115+
### z.ai (GLM)
143116

144-
| Template | Best For | Priority | Cost | Speed |
145-
|----------|----------|----------|------|-------|
146-
| **performance-optimized** | Real-time apps, chatbots | Speed | Low | ⭐⭐⭐⭐⭐ |
147-
| **cost-optimized** | Budget-conscious, bulk processing | Cost | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
148-
| **quality-focused** | Critical tasks, research | Quality | High | ⭐⭐ |
149-
| **development** | Coding, debugging | Coding | Medium | ⭐⭐⭐⭐ |
150-
| **balanced** | General use | Balanced | Medium | ⭐⭐⭐⭐ |
117+
- **Website**: https://z.ai
118+
- **Models**: GLM-5, GLM-4.7, GLM-4.5
119+
- **Endpoints**:
120+
- Coding Plan: `https://api.z.ai/api/coding/paas/v4`
121+
- API Credits: `https://api.z.ai/api/paas/v4`
122+
- **Pricing**: Very competitive, 3x usage with Coding Plan
123+
124+
### Claude Pro
125+
126+
- **Website**: https://www.anthropic.com/claude
127+
- **Models**: Claude Sonnet 4.5, Claude Opus 4.5, Claude Haiku
128+
- **Access**: Use `claude login` or API key
129+
130+
### DeepSeek
131+
132+
- **Website**: https://www.deepseek.com
133+
- **Models**: deepseek-chat, deepseek-coder
134+
- **Pricing**: Very affordable
135+
136+
### MiniMax
137+
138+
- **Website**: https://www.minimax.io
139+
- **Models**: M2.5, M2, M1
140+
- **Endpoint**: `https://api.minimax.io/anthropic`
141+
- **Features**: Ultra-long context (200k+ tokens), very competitive pricing
142+
143+
---
144+
145+
## 🛠️ Advanced Features
146+
147+
### Full Router Mode
148+
149+
For intent-based routing with automatic model selection:
151150

152151
```bash
153-
# Quick template selection
154-
ccr config template performance-optimized # Fastest
155-
ccr config template cost-optimized # Cheapest
156-
ccr config template quality-focused # Best quality
152+
ccr start # Start router
153+
ccr code # Start Claude Code with router
154+
ccr status # Check status
155+
ccr benchmark # Benchmark providers
157156
```
158157

159-
## Analytics Dashboard
158+
### Configuration Templates
160159

161-
View comprehensive analytics via:
162160
```bash
163-
# Web Dashboard (if enabled)
164-
ccr ui
161+
ccr config template performance-optimized # Fastest
162+
ccr config template cost-optimized # Cheapest
163+
ccr config template quality-focused # Best quality
164+
```
165165

166-
# CLI Analytics
166+
### Analytics
167+
168+
```bash
167169
ccr analytics today --detailed
170+
ccr ui # Web dashboard
168171
```
169172

170-
Metrics tracked:
171-
- Request volume and patterns
172-
- Cost per provider/model
173-
- Response times and latency
174-
- Success/error rates
175-
- Provider health status
173+
---
176174

177-
## Documentation
175+
## 📖 Documentation
178176

179-
- [**Provider Setup Guide** (EN/TR)](docs/PROVIDER_SETUP.md) - **Multiple providers with intelligent routing**
180-
- [Complete Documentation (EN)](docs/FULL_DOCUMENTATION_EN.md)
181-
- [Complete Documentation (TR)](docs/FULL_DOCUMENTATION.md)
182-
- [Setup Prompt (EN)](docs/SETUP_PROMPT_EN.md)
183-
- [Setup Prompt (TR)](docs/SETUP_PROMPT.md)
184-
- [Configuration Templates Guide](templates/README.md)
177+
- [Setup Guide (TR/EN)](SETUP.md)
178+
- [Provider Setup Guide](docs/PROVIDER_SETUP.md)
179+
- [Full Documentation](docs/FULL_DOCUMENTATION_EN.md)
185180

186-
## Provider Setup / Sağlayıcı Kurulumu 🆕
181+
---
187182

188-
**📖 Read the [Provider Setup Guide](docs/PROVIDER_SETUP.md) for:**
189-
- How to add multiple providers (OpenRouter, OpenAI, Gemini, Qwen)
190-
- Inter-provider routing with automatic fallback
191-
- Cost optimization strategies (up to 87% savings!)
192-
- Configuration examples and troubleshooting
183+
## 🔧 Troubleshooting
193184

194-
**🔗 Hızlı Provider Ekleme:**
185+
### "GLM_API_KEY not set"
186+
- Check `~/.env` file exists and has the key
187+
- Run `source ~/.zshrc` or restart terminal
195188

196-
| Provider | Get API Key | Cost (1M tokens) |
197-
|----------|-------------|------------------|
198-
| [GLM (z.ai)](https://open.bigmodel.cn/) | [Sign Up](https://open.bigmodel.cn/) | ~$0.50 ⭐ |
199-
| [Qwen](https://dashscope-intl.aliyuncs.com/) | [Sign Up](https://dashscope-intl.aliyuncs.com/) | ~$0.10 |
200-
| [Gemini](https://ai.google.dev/) | [Sign Up](https://ai.google.dev/) | ~$0.01 |
201-
| [OpenAI](https://platform.openai.com/) | [Sign Up](https://platform.openai.com/) | ~$2.50 |
202-
| [OpenRouter](https://openrouter.ai/) | [Sign Up](https://openrouter.ai/) | Variable |
189+
### Model not working
190+
- Verify API key is valid
191+
- Check quotas/balance
203192

204-
```bash
205-
# Add to ~/.env
206-
export GLM_API_KEY="your_key_here"
207-
export OPENROUTER_API_KEY="your_key_here"
208-
export GEMINI_API_KEY="your_key_here"
209-
210-
# Verify setup
211-
ccr status --detailed
212-
ccr test glm
213-
ccr benchmark --all
214-
```
193+
---
215194

216195
## License
217196

218197
MIT © [Halil Ertekin](https://github.com/halilertekin)
219198

220199
---
221200

222-
## 🌟 Show Your Support
201+
## Support
223202

224203
If you find this useful, please give it a ⭐ on [GitHub](https://github.com/halilertekin/CC-RouterMultiProvider)!

0 commit comments

Comments
 (0)