@wengine-ai/llms 2.0.85 β 2.0.86
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 +22 -139
- package/dist/cjs/server.cjs +121 -121
- package/dist/cjs/server.cjs.map +3 -3
- package/dist/esm/server.mjs +121 -121
- package/dist/esm/server.mjs.map +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
[** | **[π¬π§ English](README.md)** | [](https://www.npmjs.com/package/claude-code-router-next)
|
|
4
|
+
|
|
5
|
+
> **Note**: The original [claude-code-router](https://github.com/musistudio/claude-code-router) repository is no longer actively maintained. This project is a community-driven fork that continues to be actively developed and maintained with bug fixes, new features, and ongoing improvements.
|
|
6
6
|
|
|
7
7
|
<hr>
|
|
8
8
|
|
|
@@ -39,7 +39,7 @@ npm install -g @anthropic-ai/claude-code
|
|
|
39
39
|
Then, install Claude Code Router:
|
|
40
40
|
|
|
41
41
|
```shell
|
|
42
|
-
npm install -g
|
|
42
|
+
npm install -g claude-code-router-next
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
#### Option B: Install from GitHub (Latest Development Version)
|
|
@@ -48,13 +48,13 @@ If you want to use the latest features and bug fixes directly from the source co
|
|
|
48
48
|
|
|
49
49
|
1. **Uninstall the current version first** (to prevent command conflicts):
|
|
50
50
|
```shell
|
|
51
|
-
npm uninstall -g @
|
|
51
|
+
npm uninstall -g claude-code-router-next @musistudio/claude-code-router @wengine-ai/claude-code-router
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
2. **Clone and link locally** (recommended for developers):
|
|
55
55
|
```shell
|
|
56
|
-
git clone https://github.com/xiaoliu10/claude-code-router.git
|
|
57
|
-
cd claude-code-router
|
|
56
|
+
git clone https://github.com/xiaoliu10/claude-code-router-next.git
|
|
57
|
+
cd claude-code-router-next
|
|
58
58
|
pnpm install
|
|
59
59
|
pnpm build
|
|
60
60
|
npm link
|
|
@@ -62,23 +62,25 @@ If you want to use the latest features and bug fixes directly from the source co
|
|
|
62
62
|
|
|
63
63
|
*Alternatively, install directly from GitHub globally:*
|
|
64
64
|
```shell
|
|
65
|
-
npm install -g github:xiaoliu10/claude-code-router
|
|
65
|
+
npm install -g github:xiaoliu10/claude-code-router-next
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
#### π Migrating from the Official Upstream (@musistudio/claude-code-router)
|
|
69
69
|
|
|
70
|
-
If you are currently using the upstream community version `@musistudio/claude-code-router`
|
|
70
|
+
If you are currently using the upstream community version `@musistudio/claude-code-router` or the previous version `@wengine-ai/claude-code-router` and want to switch to `claude-code-router-next`:
|
|
71
71
|
|
|
72
|
-
1. **Uninstall the
|
|
72
|
+
1. **Uninstall the old version**:
|
|
73
73
|
```shell
|
|
74
|
-
npm uninstall -g @musistudio/claude-code-router
|
|
74
|
+
npm uninstall -g @musistudio/claude-code-router @wengine-ai/claude-code-router
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
2. **Install this version**:
|
|
78
78
|
```shell
|
|
79
|
-
npm install -g
|
|
79
|
+
npm install -g claude-code-router-next
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
+
> **Note**: Your existing configuration at `~/.claude-code-router/config.json` is **not affected** by uninstalling the old package. The new version will automatically read your existing configuration.
|
|
83
|
+
|
|
82
84
|
### 2. Configuration
|
|
83
85
|
|
|
84
86
|
Create and configure your `~/.claude-code-router/config.json` file. For more details, you can refer to `config.example.json`.
|
|
@@ -246,20 +248,12 @@ To use the router, you need to acquire API Keys from your preferred LLM provider
|
|
|
246
248
|
#### 1. Zhipu AI (BigModel / GLM CODING PLAN)
|
|
247
249
|
* **Platform**: Zhipu BigModel Platform (sponsored partner)
|
|
248
250
|
* **Link**: [Zhipu AI BigModel Platform](https://www.bigmodel.cn/claude-code?ic=RRVJPB5SII) (Use this referral link for a 10% discount on GLM CODING PLAN)
|
|
249
|
-
* **Acquisition
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
If you are using the AI coding subscription plan (monthly flat-rate), you need to get your browser's session `Authorization` token:
|
|
256
|
-
1. Log in to the [Zhipu AI BigModel Platform](https://www.bigmodel.cn/claude-code?ic=RRVJPB5SII).
|
|
257
|
-
2. Open your browser's Developer Tools (F12) and go to the **Network** tab.
|
|
258
|
-
3. Refresh the page or click on any feature (e.g., check your usage). Look for any XHR/Fetch request (such as `usage`, `interfaceacting.js`, etc.).
|
|
259
|
-
4. Inspect the **Request Headers** of that request, locate the **`Authorization`** header, and copy its entire value (which starts with `Bearer eyJ...`).
|
|
260
|
-
5. Paste this copied `Bearer ...` token into your `api_key` configuration.
|
|
261
|
-
|
|
262
|
-

|
|
251
|
+
* **Acquisition Method**:
|
|
252
|
+
1. Register and log in using the link above.
|
|
253
|
+
2. Go to the top-right **Console** -> **API Keys**.
|
|
254
|
+
3. Copy your API Key.
|
|
255
|
+
|
|
256
|
+
GLM CODING PLAN quota information is fetched with this API Key, so you no longer need to configure a web token or `quotaToken`.
|
|
263
257
|
|
|
264
258
|
#### 2. Alibaba Cloud (DashScope / Bailian / Qwen-Coder)
|
|
265
259
|
* **Platform**: Alibaba Cloud Bailian (highly capable Qwen-Coder models)
|
|
@@ -271,7 +265,7 @@ To use the router, you need to acquire API Keys from your preferred LLM provider
|
|
|
271
265
|
3. Click on **API-KEY** in the dropdown.
|
|
272
266
|
4. Click **Create New API-KEY** and copy the generated key.
|
|
273
267
|
* **Method B: Aliyun Console Cookie (For Quota Visualization in UI)**
|
|
274
|
-
If you want the Claude Code Router UI to fetch and display your
|
|
268
|
+
If you want the Claude Code Router UI to fetch and display your monthly **Qwen Coding Plan** quota progress bars, you need to configure your console session `Cookie` as `quotaToken` in your configuration:
|
|
275
269
|
1. Log in to the [Alibaba Cloud Bailian Console](https://bailian.console.aliyun.com/).
|
|
276
270
|
2. Open your browser's Developer Tools (F12) and switch to the **Network** tab.
|
|
277
271
|
3. Click the **Refresh** (η¨ιε·ζ°) button on the console's usage cards.
|
|
@@ -689,7 +683,7 @@ jobs:
|
|
|
689
683
|
|
|
690
684
|
- name: Start Claude Code Router
|
|
691
685
|
run: |
|
|
692
|
-
nohup ~/.bun/bin/bunx
|
|
686
|
+
nohup ~/.bun/bin/bunx claude-code-router-next@latest start &
|
|
693
687
|
shell: bash
|
|
694
688
|
|
|
695
689
|
- name: Run Claude Code
|
|
@@ -726,114 +720,3 @@ If you find this project helpful, please consider sponsoring its development. Yo
|
|
|
726
720
|
</tr>
|
|
727
721
|
</table>
|
|
728
722
|
|
|
729
|
-
### Our Sponsors
|
|
730
|
-
|
|
731
|
-
A huge thank you to all our sponsors for their generous support!
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
- [AIHubmix](https://aihubmix.com/)
|
|
735
|
-
- [BurnCloud](https://ai.burncloud.com)
|
|
736
|
-
- [302.AI](https://share.302.ai/ZGVF9w)
|
|
737
|
-
- [ZζΊθ°±](https://www.bigmodel.cn/claude-code?ic=FPF9IVAGFJ)
|
|
738
|
-
- @Simon Leischnig
|
|
739
|
-
- [@duanshuaimin](https://github.com/duanshuaimin)
|
|
740
|
-
- [@vrgitadmin](https://github.com/vrgitadmin)
|
|
741
|
-
- @\*o
|
|
742
|
-
- [@ceilwoo](https://github.com/ceilwoo)
|
|
743
|
-
- @\*θ―΄
|
|
744
|
-
- @\*ζ΄
|
|
745
|
-
- @K\*g
|
|
746
|
-
- @R\*R
|
|
747
|
-
- [@bobleer](https://github.com/bobleer)
|
|
748
|
-
- @\*θ
|
|
749
|
-
- @\*ε
|
|
750
|
-
- [@Clarence-pan](https://github.com/Clarence-pan)
|
|
751
|
-
- [@carter003](https://github.com/carter003)
|
|
752
|
-
- @S\*r
|
|
753
|
-
- @\*ζ
|
|
754
|
-
- @\*ζ
|
|
755
|
-
- @Z\*z
|
|
756
|
-
- @\*ηΆ
|
|
757
|
-
- [@cluic](https://github.com/cluic)
|
|
758
|
-
- @\*θ
|
|
759
|
-
- [@PromptExpert](https://github.com/PromptExpert)
|
|
760
|
-
- @\*εΊ
|
|
761
|
-
- [@yusnake](https://github.com/yusnake)
|
|
762
|
-
- @\*ι£
|
|
763
|
-
- @θ£\*
|
|
764
|
-
- @\*ζ±
|
|
765
|
-
- @\*ζΆ―
|
|
766
|
-
- @\*:-οΌ
|
|
767
|
-
- @\*\*η£
|
|
768
|
-
- @\*η’
|
|
769
|
-
- @\*ζ
|
|
770
|
-
- @Z\*o
|
|
771
|
-
- @\*η¨
|
|
772
|
-
- [@congzhangzh](https://github.com/congzhangzh)
|
|
773
|
-
- @\*\_
|
|
774
|
-
- @Z\*m
|
|
775
|
-
- @*ι«
|
|
776
|
-
- @c\*y
|
|
777
|
-
- @\*ζ
|
|
778
|
-
- [@witsice](https://github.com/witsice)
|
|
779
|
-
- @b\*g
|
|
780
|
-
- @\*δΊΏ
|
|
781
|
-
- @\*θΎ
|
|
782
|
-
- @JACK
|
|
783
|
-
- @\*ε
|
|
784
|
-
- @W\*l
|
|
785
|
-
- [@kesku](https://github.com/kesku)
|
|
786
|
-
- [@biguncle](https://github.com/biguncle)
|
|
787
|
-
- @δΊεε
|
|
788
|
-
- @a\*g
|
|
789
|
-
- @\*ζ
|
|
790
|
-
- @\*εΈ
|
|
791
|
-
- @\*ζ
|
|
792
|
-
- @S\*y
|
|
793
|
-
- @f\*o
|
|
794
|
-
- @\*ζΊ
|
|
795
|
-
- @F\*t
|
|
796
|
-
- @r\*c
|
|
797
|
-
- [@qierkang](http://github.com/qierkang)
|
|
798
|
-
- @\*ε
|
|
799
|
-
- [@snrise-z](http://github.com/snrise-z)
|
|
800
|
-
- @\*η
|
|
801
|
-
- [@greatheart1000](http://github.com/greatheart1000)
|
|
802
|
-
- @\*η
|
|
803
|
-
- @zcutlip
|
|
804
|
-
- [@Peng-YM](http://github.com/Peng-YM)
|
|
805
|
-
- @\*ζ΄
|
|
806
|
-
- @\*.
|
|
807
|
-
- @F\*t
|
|
808
|
-
- @\*ζΏ
|
|
809
|
-
- @\*ι
|
|
810
|
-
- @\*εΆ
|
|
811
|
-
- @δΈ\*o
|
|
812
|
-
- @\*ι
|
|
813
|
-
- @\*\*ζ¨
|
|
814
|
-
- @\*θΏ
|
|
815
|
-
- @\*ι
|
|
816
|
-
- @\*\*ε
|
|
817
|
-
- @\*\*ι£
|
|
818
|
-
- @\*\*ι©°
|
|
819
|
-
- @x\*g
|
|
820
|
-
- @\*\*δΈ
|
|
821
|
-
- @\*θ½
|
|
822
|
-
- @ε\*k
|
|
823
|
-
- @\*ζΆ
|
|
824
|
-
- [@θε€§](https://github.com/WitMiao)
|
|
825
|
-
- @\*ε’
|
|
826
|
-
- @\d*u
|
|
827
|
-
- @crizcraig
|
|
828
|
-
- s\*s
|
|
829
|
-
- \*η«
|
|
830
|
-
- \*ε€
|
|
831
|
-
- \*\*ι
|
|
832
|
-
- \*ζΆ
|
|
833
|
-
- \*\*ζ
|
|
834
|
-
- \*η₯
|
|
835
|
-
- \*θ―
|
|
836
|
-
- \*η
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
(If your name is masked, please contact me via my homepage email to update it with your GitHub username.)
|