@halilertekin/claude-code-router-config 2.3.0 → 2.4.2

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 CHANGED
@@ -16,6 +16,9 @@ QWEN_API_KEY=sk-...
16
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.1.0
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,7 +5,7 @@
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
8
+ ## v2.4.2 - GitHub Packages
9
9
 
10
10
  Now supports **GLM-5** with two endpoint options:
11
11
 
package/README.md CHANGED
@@ -1,217 +1,197 @@
1
1
  # Claude Code Router Config - Advanced Multi-Provider Setup
2
2
 
3
- 🚀 **v2.2.0** - GLM-5 Support with Coding Plan & API Credit endpoints!
3
+ 🚀 **v2.4.2** - 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
- ## ✨ 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
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
- ## 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
+ ```
55
22
 
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
+ ---
64
24
 
65
- ## Routing Strategy
25
+ ## 📋 Available Aliases
66
26
 
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 |
76
34
 
77
- ## Installation (Full Router)
35
+ ---
78
36
 
79
- ### Option 1: PNPM (Recommended)
37
+ ## 🚀 Installation
80
38
 
81
- Use this if you want the full routing capabilities (benchmarking, analytics, etc).
39
+ ### Option 1: NPM (Recommended)
82
40
 
83
41
  ```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
86
44
  ```
87
45
 
88
- Then run the installer to copy config files:
46
+ ### Option 2: Manual
89
47
 
90
48
  ```bash
91
- ccr-setup
49
+ git clone git@github.com:halilertekin/CC-RouterMultiProvider.git ~/code/claude-code-router-config
92
50
  ```
93
51
 
94
- Non-interactive usage (CI):
95
-
52
+ Then add to `~/.zshrc`:
96
53
  ```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"
101
55
  ```
102
56
 
103
- ### Option 2: Manual Setup
57
+ ---
104
58
 
105
- #### 1. Copy Configuration Files
59
+ ## 🔑 API Key Setup
60
+
61
+ Add to `~/.env`:
106
62
 
107
63
  ```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"
112
81
  ```
113
82
 
114
- #### 2. Set Up Environment Variables
83
+ ---
84
+
85
+ ## 💻 Claude Code Usage
115
86
 
116
- Create `.env` file:
87
+ ### Direct Aliases
117
88
 
118
89
  ```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
121
101
  ```
122
102
 
123
- #### 3. Start Router
103
+ ### With Arguments
124
104
 
125
105
  ```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
128
109
  ```
129
110
 
130
- ## API Key Setup
111
+ ---
131
112
 
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
141
114
 
142
- ## Configuration Templates
115
+ ### z.ai (GLM)
143
116
 
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 (recommended for max users), 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
+ - **Note**: For maximum users/capacity, use GLM-5 as documented in official z.ai docs
124
+
125
+ ### Claude Pro
126
+
127
+ - **Website**: https://www.anthropic.com/claude
128
+ - **Models**: Claude Sonnet 4.5, Claude Opus 4.5, Claude Haiku
129
+ - **Access**: Use `claude login` or API key
130
+
131
+ ### DeepSeek
132
+
133
+ - **Website**: https://www.deepseek.com
134
+ - **Models**: deepseek-chat, deepseek-coder
135
+ - **Pricing**: Very affordable
136
+
137
+ ### MiniMax
138
+
139
+ - **Website**: https://www.minimax.io
140
+ - **Models**: M2.5, M2, M1
141
+ - **Endpoint**: `https://api.minimax.io/anthropic`
142
+ - **Features**: Ultra-long context (200k+ tokens), very competitive pricing
143
+
144
+ ---
145
+
146
+ ## 🛠️ Advanced Features
147
+
148
+ ### Full Router Mode
149
+
150
+ For intent-based routing with automatic model selection:
151
151
 
152
152
  ```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
153
+ ccr start # Start router
154
+ ccr code # Start Claude Code with router
155
+ ccr status # Check status
156
+ ccr benchmark # Benchmark providers
157
157
  ```
158
158
 
159
- ## Analytics Dashboard
159
+ ### Configuration Templates
160
160
 
161
- View comprehensive analytics via:
162
161
  ```bash
163
- # Web Dashboard (if enabled)
164
- ccr ui
162
+ ccr config template performance-optimized # Fastest
163
+ ccr config template cost-optimized # Cheapest
164
+ ccr config template quality-focused # Best quality
165
+ ```
165
166
 
166
- # CLI Analytics
167
+ ### Analytics
168
+
169
+ ```bash
167
170
  ccr analytics today --detailed
171
+ ccr ui # Web dashboard
168
172
  ```
169
173
 
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
174
+ ---
176
175
 
177
- ## Documentation
176
+ ## 📖 Documentation
178
177
 
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)
178
+ - [Setup Guide (TR/EN)](SETUP.md)
179
+ - [Provider Setup Guide](docs/PROVIDER_SETUP.md)
180
+ - [Full Documentation](docs/FULL_DOCUMENTATION_EN.md)
185
181
 
186
- ## Provider Setup / Sağlayıcı Kurulumu 🆕
182
+ ---
187
183
 
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
184
+ ## 🔧 Troubleshooting
193
185
 
194
- **🔗 Hızlı Provider Ekleme:**
186
+ ### "GLM_API_KEY not set"
187
+ - Check `~/.env` file exists and has the key
188
+ - Run `source ~/.zshrc` or restart terminal
195
189
 
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 |
190
+ ### Model not working
191
+ - Verify API key is valid
192
+ - Check quotas/balance
203
193
 
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
- ```
194
+ ---
215
195
 
216
196
  ## License
217
197
 
@@ -219,6 +199,6 @@ MIT © [Halil Ertekin](https://github.com/halilertekin)
219
199
 
220
200
  ---
221
201
 
222
- ## 🌟 Show Your Support
202
+ ## Support
223
203
 
224
204
  If you find this useful, please give it a ⭐ on [GitHub](https://github.com/halilertekin/CC-RouterMultiProvider)!
package/cli/ccc.zsh CHANGED
@@ -51,33 +51,57 @@ ccc() {
51
51
  # 2. CONFIGURATION based on alias
52
52
  case "$model_alias" in
53
53
  glm)
54
- # z.ai / GLM Coding Plan endpoint
55
- export ANTHROPIC_BASE_URL="https://api.z.ai/api/coding/paas/v4"
54
+ # z.ai / GLM Coding Plan endpoint (Anthropic-compatible)
55
+ export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
56
+ export ANTHROPIC_API_KEY="${GLM_API_KEY:-${PPINFRA_API_KEY:-$GLM_KEY}}"
57
+ export ANTHROPIC_AUTH_TOKEN="$ANTHROPIC_API_KEY"
58
+ export API_TIMEOUT_MS=3000000
59
+
60
+ # Model mappings - GLM-5 for Coding Plan (manual override required per docs)
61
+ export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-4.7"
62
+ export ANTHROPIC_DEFAULT_OPUS_MODEL="glm-4.7"
63
+ export ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-4.5-air"
64
+ export ANTHROPIC_SMALL_FAST_MODEL="glm-4.5-air"
65
+ export CLAUDE_CODE_SUBAGENT_MODEL="glm-4.7"
66
+ # For GLM-5 specifically, also set the default model
67
+ export ANTHROPIC_MODEL="glm-4.7"
68
+
69
+ if [[ -z "$ANTHROPIC_API_KEY" ]]; then
70
+ echo "GLM_API_KEY not set. Add it to ~/.env or ~/.claude-code-router/keys.env" >&2
71
+ return 1
72
+ fi
73
+
74
+ echo "🔄 Provider: z.ai (GLM Coding Plan)"
75
+ ;;
76
+
77
+ glm5)
78
+ # z.ai / GLM-5 specifically (requires manual model setting per docs)
79
+ export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
56
80
  export ANTHROPIC_API_KEY="${GLM_API_KEY:-${PPINFRA_API_KEY:-$GLM_KEY}}"
57
81
  export ANTHROPIC_AUTH_TOKEN="$ANTHROPIC_API_KEY"
58
- export ANTHROPIC_MODEL="glm-5"
59
82
  export API_TIMEOUT_MS=3000000
60
83
 
84
+ # Model mappings for GLM-5
61
85
  export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-5"
62
86
  export ANTHROPIC_DEFAULT_OPUS_MODEL="glm-5"
63
87
  export ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-4.5-air"
64
88
  export ANTHROPIC_SMALL_FAST_MODEL="glm-4.5-air"
65
89
  export CLAUDE_CODE_SUBAGENT_MODEL="glm-5"
90
+ export ANTHROPIC_MODEL="glm-5"
66
91
 
67
92
  if [[ -z "$ANTHROPIC_API_KEY" ]]; then
68
93
  echo "GLM_API_KEY not set. Add it to ~/.env or ~/.claude-code-router/keys.env" >&2
69
94
  return 1
70
95
  fi
71
96
 
72
- echo "🔄 Provider: z.ai (GLM-5 Coding Plan)"
97
+ echo "🔄 Provider: z.ai (GLM-5)"
73
98
  ;;
74
99
 
75
100
  glmapi)
76
101
  # z.ai / GLM Standard API (kredi ile kullanım)
77
- export ANTHROPIC_BASE_URL="https://api.z.ai/api/paas/v4"
102
+ export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
78
103
  export ANTHROPIC_API_KEY="${GLM_API_KEY:-${PPINFRA_API_KEY:-$GLM_KEY}}"
79
104
  export ANTHROPIC_AUTH_TOKEN="$ANTHROPIC_API_KEY"
80
- export ANTHROPIC_MODEL="glm-5"
81
105
  export API_TIMEOUT_MS=3000000
82
106
 
83
107
  export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-5"
@@ -85,6 +109,7 @@ ccc() {
85
109
  export ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-4.5-air"
86
110
  export ANTHROPIC_SMALL_FAST_MODEL="glm-4.5-air"
87
111
  export CLAUDE_CODE_SUBAGENT_MODEL="glm-5"
112
+ export ANTHROPIC_MODEL="glm-5"
88
113
 
89
114
  if [[ -z "$ANTHROPIC_API_KEY" ]]; then
90
115
  echo "GLM_API_KEY not set. Add it to ~/.env or ~/.claude-code-router/keys.env" >&2
@@ -111,9 +136,30 @@ ccc() {
111
136
  echo "🔄 Provider: Official Anthropic (Claude Pro)"
112
137
  ;;
113
138
 
139
+ mm|minimax)
140
+ # MiniMax configuration
141
+ export ANTHROPIC_BASE_URL="https://api.minimax.io/anthropic"
142
+ export ANTHROPIC_API_KEY="${MINIMAX_API_KEY}"
143
+ export ANTHROPIC_AUTH_TOKEN="$ANTHROPIC_API_KEY"
144
+ export ANTHROPIC_MODEL="MiniMax-M2.5"
145
+ export API_TIMEOUT_MS=3000000
146
+
147
+ export ANTHROPIC_DEFAULT_SONNET_MODEL="MiniMax-M2.5"
148
+ export ANTHROPIC_DEFAULT_OPUS_MODEL="MiniMax-M2.5"
149
+ export ANTHROPIC_DEFAULT_HAIKU_MODEL="MiniMax-M2"
150
+ export CLAUDE_CODE_SUBAGENT_MODEL="MiniMax-M2.5"
151
+
152
+ if [[ -z "$ANTHROPIC_API_KEY" ]]; then
153
+ echo "MINIMAX_API_KEY not set. Add it to ~/.env" >&2
154
+ return 1
155
+ fi
156
+
157
+ echo "🔄 Provider: MiniMax (M2.5)"
158
+ ;;
159
+
114
160
  *)
115
161
  echo "Unknown model alias: $model_alias"
116
- echo "Available: glm (coding plan), glmapi (kredi), ds, claude"
162
+ echo "Available: glm (coding plan), glmapi (kredi), ds, claude, mm"
117
163
  return 1
118
164
  ;;
119
165
  esac
@@ -122,14 +168,17 @@ ccc() {
122
168
  [[ -n "$ANTHROPIC_BASE_URL" ]] && echo "🌐 Base URL: $ANTHROPIC_BASE_URL"
123
169
 
124
170
  if [[ ${#extra_args[@]} -eq 0 ]]; then
125
- exec claude
171
+ claude
126
172
  else
127
- exec claude "${extra_args[@]}"
173
+ claude "${extra_args[@]}"
128
174
  fi
129
175
  }
130
176
 
131
177
  # Shortcuts
132
178
  alias glm="ccc glm"
179
+ alias glm5="ccc glm5"
133
180
  alias glmapi="ccc glmapi"
134
181
  alias deepseek="ccc ds"
135
182
  alias claude-pro="ccc claude"
183
+ alias minimax="ccc mm"
184
+ alias mm="ccc mm"
@@ -1,7 +1,7 @@
1
1
  # Claude Code Router - Tam Dokümantasyon
2
2
 
3
- > **Versiyon**: 1.0.73
4
- > **Tarih**: 2025-12-20
3
+ > **Versiyon**: 2.4.0
4
+ > **Tarih**: 2026-02-15
5
5
  > **Amaç**: Tek Claude Code arayüzünden birden fazla AI provider'a intent-based routing
6
6
 
7
7
  ---
@@ -108,7 +108,7 @@ Claude Code Router, Claude Code CLI'ı bir proxy üzerinden çalıştırarak ist
108
108
  | Özellik | Değer |
109
109
  |---------|-------|
110
110
  | **API URL** | `https://api.z.ai/api/coding/paas/v4/chat/completions` |
111
- | **Modeller** | glm-4.7, glm-4.6, glm-4.5, glm-4-plus |
111
+ | **Modeller** | glm-5 (önerilen), glm-4.7, glm-4.6, glm-4.5, glm-4-plus |
112
112
  | **Kullanım** | Çok dilli, Çince, çeviri |
113
113
  | **Maliyet** | Düşük |
114
114
  | **Env Var** | `GLM_API_KEY` |
@@ -135,7 +135,7 @@ Claude Code Router, Claude Code CLI'ı bir proxy üzerinden çalıştırarak ist
135
135
  | **REASONING** | architect, design, analyze, plan, why, explain, compare, evaluate, best practice | Anthropic | claude-sonnet-4 |
136
136
  | **FAST** | fast, quick, brief, summary, tldr, overview, hızlı, scan, check | Gemini | gemini-2.5-flash |
137
137
  | **SIMPLE** | list, show, what is, simple, basic, help, format, rename, mkdir, ucuz, basit | Qwen | qwen-plus |
138
- | **MULTILINGUAL** | translate, çevir, tercüme, chinese, türkçe, Çince karakterler | GLM | glm-4.7 |
138
+ | **MULTILINGUAL** | translate, çevir, tercüme, chinese, türkçe, Çince karakterler | GLM | glm-5 |
139
139
  | **HEAVY_REASONING** | complex algorithm, optimization, performance critical, prove, mathematical | OpenAI | o1 |
140
140
 
141
141
  ### Built-in Router Ayarları
@@ -340,7 +340,7 @@ Claude Code içinde `/model` komutu:
340
340
  /model gemini,gemini-2.5-pro
341
341
  /model qwen,qwen-plus
342
342
  /model qwen,qwen3-coder-plus
343
- /model glm,glm-4.7
343
+ /model glm,glm-5
344
344
  /model openrouter,deepseek/deepseek-chat
345
345
  ```
346
346
 
@@ -1,7 +1,7 @@
1
1
  # Claude Code Router - Complete Documentation
2
2
 
3
- > **Version**: 1.0.73
4
- > **Date**: 2025-12-20
3
+ > **Version**: 2.4.0
4
+ > **Date**: 2026-02-15
5
5
  > **Purpose**: Multi-provider AI routing through Claude Code with intent-based selection
6
6
 
7
7
  ---
@@ -108,7 +108,7 @@ Claude Code Router acts as a proxy that intercepts Claude Code CLI requests and
108
108
  | Feature | Value |
109
109
  |---------|-------|
110
110
  | **API URL** | `https://api.z.ai/api/coding/paas/v4/chat/completions` |
111
- | **Models** | glm-4.7, glm-4.6, glm-4.5, glm-4-plus |
111
+ | **Models** | glm-5 (recommended), glm-4.7, glm-4.6, glm-4.5, glm-4-plus |
112
112
  | **Use Case** | Multilingual, Chinese, translation |
113
113
  | **Cost** | Low |
114
114
  | **Env Var** | `GLM_API_KEY` |
@@ -144,7 +144,7 @@ Claude Code Router acts as a proxy that intercepts Claude Code CLI requests and
144
144
  | **REASONING** | architect, design, analyze, plan, why, explain, compare, evaluate, best practice | Anthropic | claude-sonnet-4 |
145
145
  | **FAST** | fast, quick, brief, summary, tldr, overview, scan, check | Gemini | gemini-2.5-flash |
146
146
  | **SIMPLE** | list, show, what is, simple, basic, help, format, rename, mkdir | Qwen | qwen-plus |
147
- | **MULTILINGUAL** | translate, translate, multilingual, Chinese characters | GLM | glm-4.7 |
147
+ | **MULTILINGUAL** | translate, translate, multilingual, Chinese characters | GLM | glm-5 |
148
148
  | **HEAVY_REASONING** | complex algorithm, optimization, performance critical, prove, mathematical | OpenAI | o1 |
149
149
  | **CODING_ASSIST** | help me code, fix this error, suggest improvement, refactor | GitHub Copilot | copilot |
150
150
 
@@ -345,7 +345,7 @@ Inside Claude Code using `/model` command:
345
345
  /model gemini,gemini-2.5-pro
346
346
  /model qwen,qwen-plus
347
347
  /model qwen,qwen3-coder-plus
348
- /model glm,glm-4.7
348
+ /model glm,glm-5
349
349
  /model openrouter,deepseek/deepseek-chat
350
350
  /model copilot,copilot
351
351
  ```
@@ -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) Qwen (Fallback)
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)** | `https://api.z.ai/api/anthropic` | ~$0.50 | Cost-effective, multilingual |
53
- | **Qwen** | `https://dashscope-intl.aliyuncs.com/...` | ~$0.10 | Coding, cost-optimized |
54
- | **Gemini** | `https://generativelanguage.googleapis.com/...` | ~$0.01 | Fast responses |
55
- | **OpenAI** | `https://api.openai.com/v1/...` | ~$2.50 | Premium quality |
56
- | **Anthropic** | `https://api.anthropic.com/v1/...` | ~$3.00 | Best quality |
57
- | **OpenRouter** | `https://openrouter.ai/api/v1/...` | Variable | Variety, fallback |
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://open.bigmodel.cn/
67
- - Pricing: https://open.bigmodel.cn/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)**
@@ -153,7 +170,7 @@ User Request: "Help me refactor this code"
153
170
 
154
171
  Intent Router: CODING intent detected
155
172
 
156
- Provider Selection: glm,glm-4.7 (primary)
173
+ Provider Selection: glm,glm-5 (primary)
157
174
 
158
175
  Try GLM → Success ✅
159
176
  OR
@@ -169,7 +186,7 @@ Try GLM → Failure ❌ → Fallback to Qwen ✅
169
186
  ```json
170
187
  {
171
188
  "Router": {
172
- "default": "glm,glm-4.7",
189
+ "default": "glm,glm-5",
173
190
  "fallbacks": ["qwen,qwen-plus", "gemini,gemini-2.5-flash"]
174
191
  }
175
192
  }
@@ -186,7 +203,7 @@ export GLM_API_KEY="your_key"
186
203
  ```json
187
204
  {
188
205
  "Router": {
189
- "default": "glm,glm-4.7",
206
+ "default": "glm,glm-5",
190
207
  "fallbacks": ["qwen,qwen-plus", "gemini,gemini-2.5-flash", "openai,gpt-4o"]
191
208
  }
192
209
  }
@@ -206,7 +223,7 @@ export OPENAI_API_KEY="your_openai_key"
206
223
  {
207
224
  "Router": {
208
225
  "default": "anthropic,claude-sonnet-4-latest",
209
- "fallbacks": ["openai,gpt-4o", "glm,glm-4.7"]
226
+ "fallbacks": ["openai,gpt-4o", "glm,glm-5"]
210
227
  }
211
228
  }
212
229
  ```
@@ -228,7 +245,7 @@ Edit `~/.claude-code-router/smart-intent-router.js`:
228
245
  // Custom routing based on your needs
229
246
  CODING: {
230
247
  patterns: [/\b(coding|debug|refactor)\b/i],
231
- route: "glm,glm-4.7", // Primary
248
+ route: "glm,glm-5", // Primary
232
249
  fallbacks: [
233
250
  "qwen,qwen3-coder-plus", // Fallback 1
234
251
  "openai,gpt-4o" // Fallback 2 (premium)
@@ -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) Qwen (Yedek)
300
- Gemini (Yedek 2)
301
- OpenAI (Premium)
302
- Anthropic (Kalite)
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)** | `https://api.z.ai/api/anthropic` | ~$0.50 | Ucuz, çok dilli |
332
- | **Qwen** | `https://dashscope-intl.aliyuncs.com/...` | ~$0.10 | Kodlama, ucuz |
333
- | **Gemini** | `https://generativelanguage.googleapis.com/...` | ~$0.01 | Hızlı cevap |
334
- | **OpenAI** | `https://api.openai.com/v1/...` | ~$2.50 | Premium kalite |
335
- | **Anthropic** | `https://api.anthropic.com/v1/...` | ~$3.00 | En iyi kalite |
336
- | **OpenRouter** | `https://openrouter.ai/api/v1/...` | Değişken | Çeşitlilik |
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://open.bigmodel.cn/
346
- - Fiyatlandırma: https://open.bigmodel.cn/pricing
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"
@@ -432,7 +468,7 @@ Kullanıcı İsteği: "Bu kodu refactor etmemeye yardımcı olur musun?"
432
468
 
433
469
  Intent Router: KODlama intent'i algılandı
434
470
 
435
- Sağlayıcı Seçimi: glm,glm-4.7 (birincil)
471
+ Sağlayıcı Seçimi: glm,glm-5 (birincil)
436
472
 
437
473
  GLM Dene → Başarılı ✅
438
474
  VEYA
@@ -448,7 +484,7 @@ GLM Dene → Başarısız ❌ → Qwen Yedeği ✅
448
484
  ```json
449
485
  {
450
486
  "Router": {
451
- "default": "glm,glm-4.7",
487
+ "default": "glm,glm-5",
452
488
  "fallbacks": ["qwen,qwen-plus", "gemini,gemini-2.5-flash"]
453
489
  }
454
490
  }
@@ -465,7 +501,7 @@ export GLM_API_KEY="senin_key"
465
501
  ```json
466
502
  {
467
503
  "Router": {
468
- "default": "glm,glm-4.7",
504
+ "default": "glm,glm-5",
469
505
  "fallbacks": ["qwen,qwen-plus", "gemini,gemini-2.5-flash", "openai,gpt-4o"]
470
506
  }
471
507
  }
@@ -485,7 +521,7 @@ export OPENAI_API_KEY="openai_key"
485
521
  {
486
522
  "Router": {
487
523
  "default": "anthropic,claude-sonnet-4-latest",
488
- "fallbacks": ["openai,gpt-4o", "glm,glm-4.7"]
524
+ "fallbacks": ["openai,gpt-4o", "glm,glm-5"]
489
525
  }
490
526
  }
491
527
  ```
@@ -507,7 +543,7 @@ export GLM_API_KEY="glm_key"
507
543
  // İhtiyaçlarına göre özel yönlendirme
508
544
  CODING: {
509
545
  patterns: [/\b(coding|debug|refactor|kodlama)\b/i],
510
- route: "glm,glm-4.7", // Birincil
546
+ route: "glm,glm-5", // Birincil
511
547
  fallbacks: [
512
548
  "qwen,qwen3-coder-plus", // Yedek 1
513
549
  "openai,gpt-4o" // Yedek 2 (premium)
@@ -595,5 +631,5 @@ ccr ui # Web dashboard'ı aç
595
631
  ---
596
632
 
597
633
  *Created by Halil Ertekin*
598
- *Version: 2.0.9*
599
- *Last Updated: 2025-01-11*
634
+ *Version: 2.4.0*
635
+ *Last Updated: 2026-02-15*
package/docs/README_EN.md CHANGED
@@ -17,7 +17,7 @@ Use Claude Code as a single interface to access multiple AI providers with inten
17
17
  | Deep analysis, architecture | Anthropic | claude-sonnet-4 |
18
18
  | Quick responses, summaries | Gemini | gemini-2.5-flash |
19
19
  | Simple tasks | Qwen | qwen-plus |
20
- | Translation, multilingual | GLM | glm-4.7 |
20
+ | Translation, multilingual | GLM | glm-5 |
21
21
  | Complex algorithms | OpenAI | o1 |
22
22
  | Coding assistance | GitHub Copilot | copilot |
23
23
 
@@ -111,7 +111,7 @@ Inside Claude Code:
111
111
  /model anthropic,claude-sonnet-4-latest
112
112
  /model gemini,gemini-2.5-flash
113
113
  /model qwen,qwen-plus
114
- /model glm,glm-4.7
114
+ /model glm,glm-5
115
115
  /model copilot,copilot
116
116
  ```
117
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halilertekin/claude-code-router-config",
3
- "version": "2.3.0",
3
+ "version": "2.4.2",
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": {
@@ -106,5 +106,9 @@
106
106
  "overrides": {
107
107
  "qs": "6.14.1"
108
108
  }
109
+ },
110
+ "publishConfig": {
111
+ "registry": "https://npm.pkg.github.com",
112
+ "access": "public"
109
113
  }
110
114
  }