@musistudio/claude-code-router 1.0.0 → 1.0.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/LICENSE +21 -0
- package/README.md +21 -3
- package/package.json +1 -1
- package/dist/cli.js +0 -36506
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 musistudio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Claude Code Router
|
|
2
2
|
|
|
3
|
-
> This is a
|
|
3
|
+
> This is a tool for routing Claude Code requests to different models, and you can customize any request.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+

|
|
4
7
|
|
|
5
8
|
## Usage
|
|
6
9
|
|
|
@@ -23,7 +26,7 @@ ccr code
|
|
|
23
26
|
```
|
|
24
27
|
|
|
25
28
|
|
|
26
|
-
## Plugin
|
|
29
|
+
## Plugin[Beta]
|
|
27
30
|
|
|
28
31
|
The plugin allows users to rewrite Claude Code prompt and custom router. The plugin path is in `$HOME/.claude-code-router/plugins`. Currently, there are two demos available:
|
|
29
32
|
1. [custom router](https://github.com/musistudio/claude-code-router/blob/dev/custom-prompt/plugins/deepseek.js)
|
|
@@ -44,4 +47,19 @@ You need to move them to the `$HOME/.claude-code-router/plugins` directory and c
|
|
|
44
47
|
## Features
|
|
45
48
|
- [x] Plugins
|
|
46
49
|
- [ ] Support change models
|
|
47
|
-
- [ ]
|
|
50
|
+
- [ ] Support scheduled tasks
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Some tips:
|
|
54
|
+
If you’re using the DeepSeek API provided by the official website, you might encounter an “exceeding context” error after several rounds of conversation (since the official API only supports a 64K context window). In this case, you’ll need to discard the previous context and start fresh. Alternatively, you can use ByteDance’s DeepSeek API, which offers a 128K context window and supports KV cache.
|
|
55
|
+
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
Note: claude code consumes a huge amount of tokens, but thanks to DeepSeek’s low cost, you can use claude code at a fraction of Claude’s price, and you don’t need to subscribe to the Claude Max plan.
|
|
59
|
+
|
|
60
|
+
Some interesting points: Based on my testing, including a lot of context information can help narrow the performance gap between these LLM models. For instance, when I used Claude-4 in VSCode Copilot to handle a Flutter issue, it messed up the files in three rounds of conversation, and I had to roll everything back. However, when I used claude code with DeepSeek, after three or four rounds of conversation, I finally managed to complete my task—and the cost was less than 1 RMB!
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## Buy me a coffee
|
|
64
|
+
If you find this project helpful, you can choose to sponsor the author with a cup of coffee.
|
|
65
|
+
[Buy me a coffee](http://paypal.me/musistudio1999)
|