@halilertekin/claude-code-router-config 2.2.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +4 -1
- package/CHANGELOG.md +15 -1
- package/NPM_README.md +14 -7
- package/README.md +136 -157
- package/cli/ccc.zsh +24 -1
- package/docs/FULL_DOCUMENTATION.md +2 -2
- package/docs/FULL_DOCUMENTATION_EN.md +2 -2
- package/docs/PROVIDER_SETUP.md +64 -28
- package/package.json +1 -1
package/.env.example
CHANGED
|
@@ -13,9 +13,12 @@ GEMINI_API_KEY=AIza...
|
|
|
13
13
|
# Alibaba Qwen (DashScope)
|
|
14
14
|
QWEN_API_KEY=sk-...
|
|
15
15
|
|
|
16
|
-
# Zhipu GLM (Z.ai)
|
|
16
|
+
# Zhipu GLM (Z.ai) - https://z.ai/apikeys
|
|
17
17
|
GLM_API_KEY=...
|
|
18
18
|
|
|
19
|
+
# MiniMax - https://platform.minimax.io/
|
|
20
|
+
MINIMAX_API_KEY=...
|
|
21
|
+
|
|
19
22
|
# OpenRouter (fallback)
|
|
20
23
|
OPENROUTER_API_KEY=sk-or-...
|
|
21
24
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2.
|
|
3
|
+
## 2.4.0
|
|
4
|
+
- **NEW**: MiniMax support with `minimax` / `mm` aliases (M2.5 model)
|
|
5
|
+
- **NEW**: GLM-5 support with two endpoints:
|
|
6
|
+
- `glm` → Coding Plan endpoint (3x usage)
|
|
7
|
+
- `glmapi` → API Credits endpoint (pay-per-use)
|
|
8
|
+
- **NEW**: Complete documentation overhaul (TR/EN)
|
|
9
|
+
- **NEW**: GitHub Actions workflow for automated release
|
|
10
|
+
- **IMPROVED**: ccc.zsh now supports multiple providers with easy aliases
|
|
11
|
+
- **IMPROVED**: README.md with all provider details
|
|
12
|
+
|
|
13
|
+
## 2.3.0
|
|
14
|
+
- GLM-5 integration via z.ai
|
|
15
|
+
|
|
16
|
+
## 2.2.0
|
|
17
|
+
- GLM-5 support with Coding Plan and API Credit endpoints
|
|
4
18
|
- **NEW**: UI now supports 3 languages - Turkish (TR), Dutch (NL), and English (EN)
|
|
5
19
|
- **NEW**: Comprehensive provider setup guide added with multi-provider routing documentation
|
|
6
20
|
- **NEW**: Inter-provider routing with automatic fallback support
|
package/NPM_README.md
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
Multi-provider configuration for Claude Code Router with intelligent intent-based routing.
|
|
7
7
|
|
|
8
|
+
## v2.2.0 - GLM-5 Support
|
|
9
|
+
|
|
10
|
+
Now supports **GLM-5** with two endpoint options:
|
|
11
|
+
|
|
12
|
+
| Alias | Endpoint | Use Case |
|
|
13
|
+
|-------|----------|----------|
|
|
14
|
+
| `glm` | z.ai Coding Plan | Subscription-based coding |
|
|
15
|
+
| `glmapi` | z.ai API Credits | Pay-per-use with credits |
|
|
16
|
+
|
|
8
17
|
## Quick Install
|
|
9
18
|
|
|
10
19
|
```bash
|
|
@@ -31,11 +40,8 @@ ccr-setup --overwrite
|
|
|
31
40
|
```bash
|
|
32
41
|
npx -y -p @halilertekin/claude-code-router-config ccr-glm-setup --key "YOUR_GLM_API_KEY"
|
|
33
42
|
source ~/.zshrc
|
|
34
|
-
glm
|
|
35
|
-
|
|
36
|
-
Direct z.ai is the default. If you want the router version:
|
|
37
|
-
```bash
|
|
38
|
-
glm-ccr
|
|
43
|
+
glm # GLM-5 via Coding Plan
|
|
44
|
+
glmapi # GLM-5 via API Credits
|
|
39
45
|
```
|
|
40
46
|
|
|
41
47
|
## Features
|
|
@@ -117,7 +123,7 @@ Get your API keys:
|
|
|
117
123
|
| Anthropic | https://console.anthropic.com/settings/keys |
|
|
118
124
|
| Gemini | https://aistudio.google.com/apikey |
|
|
119
125
|
| Qwen | https://dashscope.console.aliyun.com/apiKey |
|
|
120
|
-
| GLM | https://
|
|
126
|
+
| GLM (z.ai) | https://z.ai/apikeys |
|
|
121
127
|
| OpenRouter | https://openrouter.ai/keys |
|
|
122
128
|
| GitHub Copilot | https://github.com/settings/tokens |
|
|
123
129
|
|
|
@@ -141,7 +147,8 @@ Inside Claude Code:
|
|
|
141
147
|
/model anthropic,claude-sonnet-4-latest
|
|
142
148
|
/model gemini,gemini-2.5-flash
|
|
143
149
|
/model qwen,qwen-plus
|
|
144
|
-
/model glm,glm-
|
|
150
|
+
/model glm,glm-5
|
|
151
|
+
/model glmapi,glm-5
|
|
145
152
|
/model copilot,copilot
|
|
146
153
|
```
|
|
147
154
|
|
package/README.md
CHANGED
|
@@ -1,217 +1,196 @@
|
|
|
1
1
|
# Claude Code Router Config - Advanced Multi-Provider Setup
|
|
2
2
|
|
|
3
|
-
🚀 **v2.0
|
|
3
|
+
🚀 **v2.3.0** - Multi-provider Claude Code routing with GLM-5, Claude Pro, DeepSeek & more!
|
|
4
4
|
|
|
5
5
|
Use Claude Code as a single interface to access multiple AI providers with intelligent routing for optimal performance, cost, and quality.
|
|
6
6
|
|
|
7
|
-
## ✨
|
|
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-4.7 via z.ai (direct)
|
|
47
|
-
glm-ccr # Launches GLM-4.7 via local router
|
|
48
|
-
ccc ds # Launches DeepSeek
|
|
49
|
-
ccc claude # Launches Official Claude (Pro)
|
|
50
|
-
```
|
|
7
|
+
## ✨ Quick Start
|
|
51
8
|
|
|
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"
|
|
53
15
|
|
|
54
|
-
|
|
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
|
+
```
|
|
55
22
|
|
|
56
|
-
|
|
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
|
+
---
|
|
64
24
|
|
|
65
|
-
##
|
|
25
|
+
## 📋 Available Aliases
|
|
66
26
|
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
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 |
|
|
76
34
|
|
|
77
|
-
|
|
35
|
+
---
|
|
78
36
|
|
|
79
|
-
|
|
37
|
+
## 🚀 Installation
|
|
80
38
|
|
|
81
|
-
|
|
39
|
+
### Option 1: NPM (Recommended)
|
|
82
40
|
|
|
83
41
|
```bash
|
|
84
|
-
|
|
85
|
-
|
|
42
|
+
npm install -g @halilertekin/claude-code-router-config
|
|
43
|
+
source ~/.zshrc
|
|
86
44
|
```
|
|
87
45
|
|
|
88
|
-
|
|
46
|
+
### Option 2: Manual
|
|
89
47
|
|
|
90
48
|
```bash
|
|
91
|
-
|
|
49
|
+
git clone git@github.com:halilertekin/CC-RouterMultiProvider.git ~/code/claude-code-router-config
|
|
92
50
|
```
|
|
93
51
|
|
|
94
|
-
|
|
95
|
-
|
|
52
|
+
Then add to `~/.zshrc`:
|
|
96
53
|
```bash
|
|
97
|
-
|
|
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"
|
|
101
55
|
```
|
|
102
56
|
|
|
103
|
-
|
|
57
|
+
---
|
|
104
58
|
|
|
105
|
-
|
|
59
|
+
## 🔑 API Key Setup
|
|
60
|
+
|
|
61
|
+
Add to `~/.env`:
|
|
106
62
|
|
|
107
63
|
```bash
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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"
|
|
112
81
|
```
|
|
113
82
|
|
|
114
|
-
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 💻 Claude Code Usage
|
|
115
86
|
|
|
116
|
-
|
|
87
|
+
### Direct Aliases
|
|
117
88
|
|
|
118
89
|
```bash
|
|
119
|
-
|
|
120
|
-
|
|
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
|
|
121
101
|
```
|
|
122
102
|
|
|
123
|
-
|
|
103
|
+
### With Arguments
|
|
124
104
|
|
|
125
105
|
```bash
|
|
126
|
-
|
|
127
|
-
|
|
106
|
+
glm "write a React component"
|
|
107
|
+
glmapi --print "explain this code"
|
|
108
|
+
claude-pro --dangerous-skip-install
|
|
128
109
|
```
|
|
129
110
|
|
|
130
|
-
|
|
111
|
+
---
|
|
131
112
|
|
|
132
|
-
|
|
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
|
|
141
114
|
|
|
142
|
-
|
|
115
|
+
### z.ai (GLM)
|
|
143
116
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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:
|
|
151
150
|
|
|
152
151
|
```bash
|
|
153
|
-
#
|
|
154
|
-
ccr
|
|
155
|
-
ccr
|
|
156
|
-
ccr
|
|
152
|
+
ccr start # Start router
|
|
153
|
+
ccr code # Start Claude Code with router
|
|
154
|
+
ccr status # Check status
|
|
155
|
+
ccr benchmark # Benchmark providers
|
|
157
156
|
```
|
|
158
157
|
|
|
159
|
-
|
|
158
|
+
### Configuration Templates
|
|
160
159
|
|
|
161
|
-
View comprehensive analytics via:
|
|
162
160
|
```bash
|
|
163
|
-
|
|
164
|
-
ccr
|
|
161
|
+
ccr config template performance-optimized # Fastest
|
|
162
|
+
ccr config template cost-optimized # Cheapest
|
|
163
|
+
ccr config template quality-focused # Best quality
|
|
164
|
+
```
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
### Analytics
|
|
167
|
+
|
|
168
|
+
```bash
|
|
167
169
|
ccr analytics today --detailed
|
|
170
|
+
ccr ui # Web dashboard
|
|
168
171
|
```
|
|
169
172
|
|
|
170
|
-
|
|
171
|
-
- Request volume and patterns
|
|
172
|
-
- Cost per provider/model
|
|
173
|
-
- Response times and latency
|
|
174
|
-
- Success/error rates
|
|
175
|
-
- Provider health status
|
|
173
|
+
---
|
|
176
174
|
|
|
177
|
-
## Documentation
|
|
175
|
+
## 📖 Documentation
|
|
178
176
|
|
|
179
|
-
- [
|
|
180
|
-
- [
|
|
181
|
-
- [
|
|
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)
|
|
185
180
|
|
|
186
|
-
|
|
181
|
+
---
|
|
187
182
|
|
|
188
|
-
|
|
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
|
|
193
184
|
|
|
194
|
-
|
|
185
|
+
### "GLM_API_KEY not set"
|
|
186
|
+
- Check `~/.env` file exists and has the key
|
|
187
|
+
- Run `source ~/.zshrc` or restart terminal
|
|
195
188
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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
|
|
203
192
|
|
|
204
|
-
|
|
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
|
+
---
|
|
215
194
|
|
|
216
195
|
## License
|
|
217
196
|
|
|
@@ -219,6 +198,6 @@ MIT © [Halil Ertekin](https://github.com/halilertekin)
|
|
|
219
198
|
|
|
220
199
|
---
|
|
221
200
|
|
|
222
|
-
##
|
|
201
|
+
## ⭐ Support
|
|
223
202
|
|
|
224
203
|
If you find this useful, please give it a ⭐ on [GitHub](https://github.com/halilertekin/CC-RouterMultiProvider)!
|
package/cli/ccc.zsh
CHANGED
|
@@ -111,9 +111,30 @@ ccc() {
|
|
|
111
111
|
echo "🔄 Provider: Official Anthropic (Claude Pro)"
|
|
112
112
|
;;
|
|
113
113
|
|
|
114
|
+
mm|minimax)
|
|
115
|
+
# MiniMax configuration
|
|
116
|
+
export ANTHROPIC_BASE_URL="https://api.minimax.io/anthropic"
|
|
117
|
+
export ANTHROPIC_API_KEY="${MINIMAX_API_KEY}"
|
|
118
|
+
export ANTHROPIC_AUTH_TOKEN="$ANTHROPIC_API_KEY"
|
|
119
|
+
export ANTHROPIC_MODEL="MiniMax-M2.5"
|
|
120
|
+
export API_TIMEOUT_MS=3000000
|
|
121
|
+
|
|
122
|
+
export ANTHROPIC_DEFAULT_SONNET_MODEL="MiniMax-M2.5"
|
|
123
|
+
export ANTHROPIC_DEFAULT_OPUS_MODEL="MiniMax-M2.5"
|
|
124
|
+
export ANTHROPIC_DEFAULT_HAIKU_MODEL="MiniMax-M2"
|
|
125
|
+
export CLAUDE_CODE_SUBAGENT_MODEL="MiniMax-M2.5"
|
|
126
|
+
|
|
127
|
+
if [[ -z "$ANTHROPIC_API_KEY" ]]; then
|
|
128
|
+
echo "MINIMAX_API_KEY not set. Add it to ~/.env" >&2
|
|
129
|
+
return 1
|
|
130
|
+
fi
|
|
131
|
+
|
|
132
|
+
echo "🔄 Provider: MiniMax (M2.5)"
|
|
133
|
+
;;
|
|
134
|
+
|
|
114
135
|
*)
|
|
115
136
|
echo "Unknown model alias: $model_alias"
|
|
116
|
-
echo "Available: glm (coding plan), glmapi (kredi), ds, claude"
|
|
137
|
+
echo "Available: glm (coding plan), glmapi (kredi), ds, claude, mm"
|
|
117
138
|
return 1
|
|
118
139
|
;;
|
|
119
140
|
esac
|
|
@@ -133,3 +154,5 @@ alias glm="ccc glm"
|
|
|
133
154
|
alias glmapi="ccc glmapi"
|
|
134
155
|
alias deepseek="ccc ds"
|
|
135
156
|
alias claude-pro="ccc claude"
|
|
157
|
+
alias minimax="ccc mm"
|
|
158
|
+
alias mm="ccc mm"
|
package/docs/PROVIDER_SETUP.md
CHANGED
|
@@ -16,11 +16,13 @@ Claude Code Router supports multiple AI providers with intelligent routing. You
|
|
|
16
16
|
```
|
|
17
17
|
Request → Smart Intent Router → Provider Selection → AI Response
|
|
18
18
|
↓ ↓
|
|
19
|
-
Intent Analysis GLM (Primary)
|
|
20
|
-
(Cost Optimized)
|
|
19
|
+
Intent Analysis GLM-5 (Primary)
|
|
20
|
+
(Cost Optimized) Claude Pro (Quality)
|
|
21
|
+
DeepSeek (Budget)
|
|
22
|
+
MiniMax (Long Context)
|
|
23
|
+
Qwen (Fallback)
|
|
21
24
|
Gemini (Backup)
|
|
22
25
|
OpenAI (Premium)
|
|
23
|
-
Anthropic (Quality)
|
|
24
26
|
```
|
|
25
27
|
|
|
26
28
|
### Quick Start
|
|
@@ -49,12 +51,14 @@ ccr code # Start router + Claude Code
|
|
|
49
51
|
|
|
50
52
|
| Provider | API Base URL | Cost (per 1M tokens) | Best For |
|
|
51
53
|
|----------|-------------|---------------------|----------|
|
|
52
|
-
| **GLM (z.ai)** | `
|
|
53
|
-
| **
|
|
54
|
-
| **
|
|
55
|
-
| **
|
|
56
|
-
| **
|
|
57
|
-
| **
|
|
54
|
+
| **GLM-5 (z.ai)** | `api.z.ai/api/coding/paas/v4` | ~$0.50 | Coding Plan (3x usage) |
|
|
55
|
+
| **GLM API (z.ai)** | `api.z.ai/api/paas/v4` | ~$0.50 | Pay-per-use |
|
|
56
|
+
| **Claude Pro** | Official Anthropic | ~$3.00 | Premium quality |
|
|
57
|
+
| **DeepSeek** | `api.deepseek.com/anthropic` | ~$0.60 | Budget coding |
|
|
58
|
+
| **MiniMax** | `api.minimax.io/anthropic` | ~$0.30 | Long context (200k+) |
|
|
59
|
+
| **Qwen** | `dashscope-intl.aliyuncs.com/...` | ~$0.10 | Cost-optimized |
|
|
60
|
+
| **Gemini** | `generativelanguage.googleapis.com/...` | ~$0.01 | Fast responses |
|
|
61
|
+
| **OpenAI** | `api.openai.com/v1/...` | ~$2.50 | Premium quality |
|
|
58
62
|
|
|
59
63
|
---
|
|
60
64
|
|
|
@@ -62,9 +66,22 @@ ccr code # Start router + Claude Code
|
|
|
62
66
|
|
|
63
67
|
#### Step 1: Get API Key
|
|
64
68
|
|
|
65
|
-
**GLM (z.ai)**
|
|
66
|
-
- Website: https://
|
|
67
|
-
- Pricing:
|
|
69
|
+
**GLM-5 (z.ai) - Recommended**
|
|
70
|
+
- Website: https://z.ai/apikeys
|
|
71
|
+
- Pricing: Very competitive, 3x usage with Coding Plan
|
|
72
|
+
- Sign up → Create API Key
|
|
73
|
+
- Two endpoints:
|
|
74
|
+
- Coding Plan: `https://api.z.ai/api/coding/paas/v4`
|
|
75
|
+
- API Credits: `https://api.z.ai/api/paas/v4`
|
|
76
|
+
|
|
77
|
+
**MiniMax**
|
|
78
|
+
- Website: https://platform.minimax.io/
|
|
79
|
+
- Pricing: Very competitive, ultra-long context (200k+ tokens)
|
|
80
|
+
- Sign up → Create API Key
|
|
81
|
+
|
|
82
|
+
**DeepSeek**
|
|
83
|
+
- Website: https://platform.deepseek.com/
|
|
84
|
+
- Pricing: Affordable
|
|
68
85
|
- Sign up → Create API Key
|
|
69
86
|
|
|
70
87
|
**Qwen (Alibaba)**
|
|
@@ -295,11 +312,13 @@ Claude Code Router, birden fazla AI sağlayıcısını akıllı yönlendirme ile
|
|
|
295
312
|
```
|
|
296
313
|
İstek → Akıllı Intent Router → Sağlayıcı Seçimi → AI Cevabı
|
|
297
314
|
↓ ↓
|
|
298
|
-
Intent Analizi GLM (Birincil)
|
|
299
|
-
(Maliyet Optimize)
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
315
|
+
Intent Analizi GLM-5 (Birincil)
|
|
316
|
+
(Maliyet Optimize) Claude Pro (Kalite)
|
|
317
|
+
DeepSeek (Bütçe)
|
|
318
|
+
MiniMax (Uzun Bağlam)
|
|
319
|
+
Qwen (Yedek)
|
|
320
|
+
Gemini (Yedek 2)
|
|
321
|
+
OpenAI (Premium)
|
|
303
322
|
```
|
|
304
323
|
|
|
305
324
|
### Hızlı Başlangıç
|
|
@@ -328,12 +347,14 @@ ccr code # Router + Claude Code'u başlat
|
|
|
328
347
|
|
|
329
348
|
| Sağlayıcı | API URL | Maliyet (1M token) | En İyi Kullanım |
|
|
330
349
|
|-----------|---------|-------------------|-----------------|
|
|
331
|
-
| **GLM (z.ai)** | `
|
|
332
|
-
| **
|
|
333
|
-
| **
|
|
334
|
-
| **
|
|
335
|
-
| **
|
|
336
|
-
| **
|
|
350
|
+
| **GLM-5 (z.ai)** | `api.z.ai/api/coding/paas/v4` | ~$0.50 | Coding Plan (3x kullanım) |
|
|
351
|
+
| **GLM API (z.ai)** | `api.z.ai/api/paas/v4` | ~$0.50 | Kredi ile ödeme |
|
|
352
|
+
| **Claude Pro** | Official Anthropic | ~$3.00 | Premium kalite |
|
|
353
|
+
| **DeepSeek** | `api.deepseek.com/anthropic` | ~$0.60 | Bütçe kodlama |
|
|
354
|
+
| **MiniMax** | `api.minimax.io/anthropic` | ~$0.30 | Uzun bağlam (200k+) |
|
|
355
|
+
| **Qwen** | `dashscope-intl.aliyuncs.com/...` | ~$0.10 | Maliyet optimize |
|
|
356
|
+
| **Gemini** | `generativelanguage.googleapis.com/...` | ~$0.01 | Hızlı cevap |
|
|
357
|
+
| **OpenAI** | `api.openai.com/v1/...` | ~$2.50 | Premium kalite |
|
|
337
358
|
|
|
338
359
|
---
|
|
339
360
|
|
|
@@ -341,9 +362,22 @@ ccr code # Router + Claude Code'u başlat
|
|
|
341
362
|
|
|
342
363
|
#### Adım 1: API Key Al
|
|
343
364
|
|
|
344
|
-
**GLM (z.ai)**
|
|
345
|
-
- Website: https://
|
|
346
|
-
- Fiyatlandırma:
|
|
365
|
+
**GLM-5 (z.ai) - Önerilen**
|
|
366
|
+
- Website: https://z.ai/apikeys
|
|
367
|
+
- Fiyatlandırma: Çok uygun, Coding Plan ile 3x kullanım
|
|
368
|
+
- Kayıt ol → API Key Oluştur
|
|
369
|
+
- İki endpoint:
|
|
370
|
+
- Coding Plan: `https://api.z.ai/api/coding/paas/v4`
|
|
371
|
+
- API Kredileri: `https://api.z.ai/api/paas/v4`
|
|
372
|
+
|
|
373
|
+
**MiniMax**
|
|
374
|
+
- Website: https://platform.minimax.io/
|
|
375
|
+
- Fiyatlandırma: Çok uygun, ultra-uzun bağlam (200k+ token)
|
|
376
|
+
- Kayıt ol → API Key Oluştur
|
|
377
|
+
|
|
378
|
+
**DeepSeek**
|
|
379
|
+
- Website: https://platform.deepseek.com/
|
|
380
|
+
- Fiyatlandırma: Uygun fiyat
|
|
347
381
|
- Kayıt ol → API Key Oluştur
|
|
348
382
|
|
|
349
383
|
**Qwen (Alibaba)**
|
|
@@ -380,6 +414,8 @@ ccr code # Router + Claude Code'u başlat
|
|
|
380
414
|
export GLM_API_KEY="glm_api_key_buraya"
|
|
381
415
|
|
|
382
416
|
# Ek Sağlayıcılar (Opsiyonel - yönlendirme için)
|
|
417
|
+
export MINIMAX_API_KEY="minimax_api_key_buraya"
|
|
418
|
+
export DEEPSEEK_API_KEY="deepseek_api_key_buraya"
|
|
383
419
|
export QWEN_API_KEY="qwen_api_key_buraya"
|
|
384
420
|
export GEMINI_API_KEY="gemini_api_key_buraya"
|
|
385
421
|
export OPENAI_API_KEY="openai_api_key_buraya"
|
|
@@ -595,5 +631,5 @@ ccr ui # Web dashboard'ı aç
|
|
|
595
631
|
---
|
|
596
632
|
|
|
597
633
|
*Created by Halil Ertekin*
|
|
598
|
-
*Version: 2.0
|
|
599
|
-
*Last Updated:
|
|
634
|
+
*Version: 2.4.0*
|
|
635
|
+
*Last Updated: 2026-02-15*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@halilertekin/claude-code-router-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Multi-provider configuration for Claude Code Router with intent-based routing, advanced CLI tools, analytics, and smart routing. Setup OpenAI, Anthropic, Gemini, Qwen, GLM, OpenRouter, and GitHub Copilot with intelligent routing.",
|
|
5
5
|
"main": "install.js",
|
|
6
6
|
"bin": {
|