@dedenlabs/claude-code-router-cli 2.0.8-beta.1 → 2.0.8-beta.10
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/README.md +48 -2
- package/dist/cli.js +34313 -90605
- package/examples/configs/unified-router-example.json +50 -9
- package/package.json +89 -81
- package/packages/core/dist/cjs/server.cjs +29794 -0
- package/packages/core/dist/cjs/server.cjs.map +7 -0
- package/packages/core/dist/esm/server.mjs +29780 -0
- package/packages/core/dist/esm/server.mjs.map +7 -0
- package/packages/core/package.json +58 -0
- package/packages/core/pnpm-lock.yaml +1572 -0
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
"PORT": 3456,
|
|
5
5
|
"APIKEY": "1",
|
|
6
6
|
"API_TIMEOUT_MS": 600000,
|
|
7
|
+
"plugins": [
|
|
8
|
+
{
|
|
9
|
+
"name": "token-speed",
|
|
10
|
+
"enabled": true,
|
|
11
|
+
"options": {
|
|
12
|
+
"reporter": [
|
|
13
|
+
"console"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
],
|
|
7
18
|
"Providers": [
|
|
8
19
|
{
|
|
9
20
|
"name": "openrouter",
|
|
@@ -16,9 +27,13 @@
|
|
|
16
27
|
"@preset/kimi"
|
|
17
28
|
],
|
|
18
29
|
"transformer": {
|
|
19
|
-
"use": [
|
|
30
|
+
"use": [
|
|
31
|
+
"openrouter"
|
|
32
|
+
],
|
|
20
33
|
"deepseek/deepseek-chat-v3-0324": {
|
|
21
|
-
"use": [
|
|
34
|
+
"use": [
|
|
35
|
+
"tooluse"
|
|
36
|
+
]
|
|
22
37
|
}
|
|
23
38
|
}
|
|
24
39
|
},
|
|
@@ -26,11 +41,18 @@
|
|
|
26
41
|
"name": "deepseek",
|
|
27
42
|
"api_base_url": "https://api.deepseek.com/chat/completions",
|
|
28
43
|
"api_key": "sk-",
|
|
29
|
-
"models": [
|
|
44
|
+
"models": [
|
|
45
|
+
"deepseek-chat",
|
|
46
|
+
"deepseek-reasoner"
|
|
47
|
+
],
|
|
30
48
|
"transformer": {
|
|
31
|
-
"use": [
|
|
49
|
+
"use": [
|
|
50
|
+
"deepseek"
|
|
51
|
+
],
|
|
32
52
|
"deepseek-chat": {
|
|
33
|
-
"use": [
|
|
53
|
+
"use": [
|
|
54
|
+
"tooluse"
|
|
55
|
+
]
|
|
34
56
|
}
|
|
35
57
|
}
|
|
36
58
|
},
|
|
@@ -38,15 +60,34 @@
|
|
|
38
60
|
"name": "gemini",
|
|
39
61
|
"api_base_url": "https://generativelanguage.googleapis.com/v1beta/models/",
|
|
40
62
|
"api_key": "",
|
|
41
|
-
"models": [
|
|
63
|
+
"models": [
|
|
64
|
+
"gemini-2.5-flash",
|
|
65
|
+
"gemini-2.5-pro"
|
|
66
|
+
],
|
|
67
|
+
"transformer": {
|
|
68
|
+
"use": [
|
|
69
|
+
"gemini"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "minimax",
|
|
75
|
+
"api_base_url": "https://api.minimaxi.com/anthropic/v1/messages",
|
|
76
|
+
"api_key": "",
|
|
77
|
+
"models": [
|
|
78
|
+
"MiniMax-M2.5-highspeed",
|
|
79
|
+
"MiniMax-M2.5"
|
|
80
|
+
],
|
|
42
81
|
"transformer": {
|
|
43
|
-
"use": [
|
|
82
|
+
"use": [
|
|
83
|
+
"Anthropic"
|
|
84
|
+
]
|
|
44
85
|
}
|
|
45
86
|
}
|
|
46
87
|
],
|
|
47
88
|
"Router": {
|
|
48
89
|
"engine": "unified",
|
|
49
|
-
"defaultRoute": "
|
|
90
|
+
"defaultRoute": "minimax",
|
|
50
91
|
"rules": [
|
|
51
92
|
{
|
|
52
93
|
"name": "longContext",
|
|
@@ -162,4 +203,4 @@
|
|
|
162
203
|
}
|
|
163
204
|
},
|
|
164
205
|
"NON_INTERACTIVE_MODE": false
|
|
165
|
-
}
|
|
206
|
+
}
|
package/package.json
CHANGED
|
@@ -1,81 +1,89 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dedenlabs/claude-code-router-cli",
|
|
3
|
-
"version": "2.0.8-beta.
|
|
4
|
-
"description": "基于@musistudio/claude-code-router的增强版CLI路由工具 - 支持统一路由引擎、外部规则加载、智能日志系统、自动配置迁移和GLM思考模式",
|
|
5
|
-
"bin": {
|
|
6
|
-
"ccr": "dist/cli.js"
|
|
7
|
-
},
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"vitest": "^2.1.9"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@dedenlabs/claude-code-router-cli",
|
|
3
|
+
"version": "2.0.8-beta.10",
|
|
4
|
+
"description": "基于@musistudio/claude-code-router的增强版CLI路由工具 - 支持统一路由引擎、外部规则加载、智能日志系统、自动配置迁移和GLM思考模式",
|
|
5
|
+
"bin": {
|
|
6
|
+
"ccr": "dist/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"pnpm": {
|
|
9
|
+
"overrides": {
|
|
10
|
+
"@musistudio/llms": "workspace:*"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "node scripts/build.js",
|
|
15
|
+
"release": "npm run build && npm publish",
|
|
16
|
+
"build:core": "pnpm --filter @musistudio/llms build",
|
|
17
|
+
"dev:core": "pnpm --filter @musistudio/llms dev",
|
|
18
|
+
"prepublishOnly": "node scripts/prepublish-check.js",
|
|
19
|
+
"test": "vitest run",
|
|
20
|
+
"test:watch": "vitest",
|
|
21
|
+
"test:coverage": "vitest run --coverage",
|
|
22
|
+
"test:ui": "vitest --ui",
|
|
23
|
+
"test:integration": "vitest run --config ./vitest.config.ts tests/integration",
|
|
24
|
+
"test:unit": "vitest run --config ./vitest.config.ts tests/unit",
|
|
25
|
+
"test:ui:unit": "vitest run --config ./vitest.config.ts tests/ui"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"claude",
|
|
29
|
+
"code",
|
|
30
|
+
"router",
|
|
31
|
+
"llm",
|
|
32
|
+
"anthropic",
|
|
33
|
+
"cli",
|
|
34
|
+
"unified",
|
|
35
|
+
"external-rules"
|
|
36
|
+
],
|
|
37
|
+
"author": "dedenlabs <deden.labs@gmail.com> (Original by musistudio)",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/dedenlabs/claude-code-router-cli.git"
|
|
42
|
+
},
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/dedenlabs/claude-code-router-cli/issues"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://github.com/dedenlabs/claude-code-router-cli#readme",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@anthropic-ai/sdk": "^0.54.0",
|
|
49
|
+
"@fastify/cors": "^11.0.1",
|
|
50
|
+
"@fastify/static": "^8.2.0",
|
|
51
|
+
"@google/genai": "^1.7.0",
|
|
52
|
+
"@inquirer/prompts": "^5.0.0",
|
|
53
|
+
"@musistudio/llms": "^1.0.53",
|
|
54
|
+
"dotenv": "^16.4.7",
|
|
55
|
+
"find-process": "^2.0.0",
|
|
56
|
+
"json5": "^2.2.3",
|
|
57
|
+
"lru-cache": "^11.2.2",
|
|
58
|
+
"minimist": "^1.2.8",
|
|
59
|
+
"openai": "^5.6.0",
|
|
60
|
+
"rotating-file-stream": "^3.2.7",
|
|
61
|
+
"shell-quote": "^1.8.3",
|
|
62
|
+
"tiktoken": "^1.0.21",
|
|
63
|
+
"undici": "^7.10.0",
|
|
64
|
+
"uuid": "^11.1.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@testing-library/react": "^14.3.1",
|
|
68
|
+
"@types/node": "^24.0.15",
|
|
69
|
+
"@vitest/coverage-v8": "^2.1.9",
|
|
70
|
+
"@vitest/ui": "^2.1.9",
|
|
71
|
+
"esbuild": "^0.25.1",
|
|
72
|
+
"fastify": "^5.4.0",
|
|
73
|
+
"jsdom": "^25.0.1",
|
|
74
|
+
"shx": "^0.4.0",
|
|
75
|
+
"typescript": "^5.8.2",
|
|
76
|
+
"vitest": "^2.1.9"
|
|
77
|
+
},
|
|
78
|
+
"files": [
|
|
79
|
+
"dist/",
|
|
80
|
+
"packages",
|
|
81
|
+
"examples/",
|
|
82
|
+
"LICENSE",
|
|
83
|
+
"README.md",
|
|
84
|
+
"tsconfig.json"
|
|
85
|
+
],
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public"
|
|
88
|
+
}
|
|
89
|
+
}
|