@halilertekin/claude-code-router-config 1.3.8 → 2.0.0

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/install.sh CHANGED
@@ -22,19 +22,16 @@ if ! command -v pnpm &> /dev/null; then
22
22
  npm install -g pnpm
23
23
  fi
24
24
 
25
- # Install claude-code-router
26
- echo -e "${GREEN}[1/3] Claude Code Router kuruluyor...${NC}"
27
- pnpm add -g @musistudio/claude-code-router
28
-
29
25
  # Create config directory
30
- echo -e "${GREEN}[2/3] Config dizini oluşturuluyor...${NC}"
26
+ echo -e "${GREEN}[1/2] Config dizini oluşturuluyor...${NC}"
31
27
  mkdir -p ~/.claude-code-router
32
28
 
33
29
  # Copy config files
34
- echo -e "${GREEN}[3/3] Config dosyaları kopyalanıyor...${NC}"
30
+ echo -e "${GREEN}[2/2] Config dosyaları kopyalanıyor...${NC}"
35
31
  SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
36
32
  cp "$SCRIPT_DIR/config/config.json" ~/.claude-code-router/
37
33
  cp "$SCRIPT_DIR/config/intent-router.js" ~/.claude-code-router/
34
+ cp "$SCRIPT_DIR/config/smart-intent-router.js" ~/.claude-code-router/
38
35
 
39
36
  echo ""
40
37
  echo -e "${GREEN}=========================================="
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halilertekin/claude-code-router-config",
3
- "version": "1.3.8",
3
+ "version": "2.0.0",
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": {
@@ -74,7 +74,7 @@
74
74
  "license": "MIT",
75
75
  "repository": {
76
76
  "type": "git",
77
- "url": "https://github.com/halilertekin/CC-RouterMultiProvider.git"
77
+ "url": "git+https://github.com/halilertekin/CC-RouterMultiProvider.git"
78
78
  },
79
79
  "bugs": {
80
80
  "url": "https://github.com/halilertekin/CC-RouterMultiProvider/issues"
@@ -87,10 +87,10 @@
87
87
  "inquirer": "^8.2.6",
88
88
  "chalk": "^4.1.2",
89
89
  "fs-extra": "^11.1.1",
90
- "dotenv": "^16.3.1",
91
90
  "express": "^4.18.2",
92
91
  "cors": "^2.8.5",
93
- "@musistudio/claude-code-router": "^1.0.73"
92
+ "eventsource-parser": "^1.1.1",
93
+ "undici": "^6.21.1"
94
94
  },
95
95
  "devDependencies": {
96
96
  "jest": "^29.7.0"
package/setup-glm.sh CHANGED
@@ -232,9 +232,20 @@ EOF
232
232
  ensure_ccr
233
233
  mkdir -p "$CONFIG_DIR"
234
234
  backup_file "$CONFIG_DIR/config.json"
235
- backup_file "$CONFIG_DIR/intent-router.js"
236
235
  cp "$SCRIPT_DIR/config/glm-only.json" "$CONFIG_DIR/config.json"
237
- cp "$SCRIPT_DIR/config/intent-router-glm.js" "$CONFIG_DIR/intent-router.js"
236
+ backup_file "$CONFIG_DIR/intent-router-glm.js"
237
+ cp "$SCRIPT_DIR/config/intent-router-glm.js" "$CONFIG_DIR/intent-router-glm.js"
238
+ python - <<'PY'
239
+ import json
240
+ import os
241
+
242
+ config_path = os.path.join(os.environ["HOME"], ".claude-code-router", "config.json")
243
+ with open(config_path, "r", encoding="utf-8") as handle:
244
+ data = json.load(handle)
245
+ data["CUSTOM_ROUTER_PATH"] = "$HOME/.claude-code-router/intent-router-glm.js"
246
+ with open(config_path, "w", encoding="utf-8") as handle:
247
+ json.dump(data, handle, indent=2)
248
+ PY
238
249
  write_keys
239
250
  install_wrapper
240
251
  ensure_path
@@ -2,7 +2,7 @@
2
2
  "LOG": true,
3
3
  "LOG_LEVEL": "info",
4
4
  "API_TIMEOUT_MS": 30000,
5
- "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/intent-router.js",
5
+ "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/smart-intent-router.js",
6
6
 
7
7
  "Providers": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "LOG": true,
3
3
  "LOG_LEVEL": "warn",
4
4
  "API_TIMEOUT_MS": 30000,
5
- "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/intent-router.js",
5
+ "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/smart-intent-router.js",
6
6
 
7
7
  "Providers": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "LOG": true,
3
3
  "LOG_LEVEL": "debug",
4
4
  "API_TIMEOUT_MS": 15000,
5
- "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/intent-router.js",
5
+ "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/smart-intent-router.js",
6
6
 
7
7
  "Providers": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "LOG": true,
3
3
  "LOG_LEVEL": "info",
4
4
  "API_TIMEOUT_MS": 20000,
5
- "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/intent-router.js",
5
+ "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/smart-intent-router.js",
6
6
 
7
7
  "Providers": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "LOG": true,
3
3
  "LOG_LEVEL": "debug",
4
4
  "API_TIMEOUT_MS": 60000,
5
- "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/intent-router.js",
5
+ "CUSTOM_ROUTER_PATH": "$HOME/.claude-code-router/smart-intent-router.js",
6
6
 
7
7
  "Providers": [
8
8
  {