@musistudio/claude-code-router 1.0.60 → 1.0.62
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 +4 -0
- package/README_zh.md +4 -0
- package/dist/cli.js +9 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -534,6 +534,7 @@ A huge thank you to all our sponsors for their generous support!
|
|
|
534
534
|
|
|
535
535
|
- [AIHubmix](https://aihubmix.com/)
|
|
536
536
|
- [BurnCloud](https://ai.burncloud.com)
|
|
537
|
+
- [302.ai](https://302.ai/)
|
|
537
538
|
- @Simon Leischnig
|
|
538
539
|
- [@duanshuaimin](https://github.com/duanshuaimin)
|
|
539
540
|
- [@vrgitadmin](https://github.com/vrgitadmin)
|
|
@@ -616,5 +617,8 @@ A huge thank you to all our sponsors for their generous support!
|
|
|
616
617
|
- @\*\*飞
|
|
617
618
|
- @\*\*驰
|
|
618
619
|
- @x\*g
|
|
620
|
+
- @\*\*东
|
|
621
|
+
- @\*落
|
|
622
|
+
- @哆\*k
|
|
619
623
|
|
|
620
624
|
(If your name is masked, please contact me via my homepage email to update it with your GitHub username.)
|
package/README_zh.md
CHANGED
|
@@ -480,6 +480,7 @@ jobs:
|
|
|
480
480
|
|
|
481
481
|
- [AIHubmix](https://aihubmix.com/)
|
|
482
482
|
- [BurnCloud](https://ai.burncloud.com)
|
|
483
|
+
- [302.ai](https://302.ai/)
|
|
483
484
|
- @Simon Leischnig
|
|
484
485
|
- [@duanshuaimin](https://github.com/duanshuaimin)
|
|
485
486
|
- [@vrgitadmin](https://github.com/vrgitadmin)
|
|
@@ -562,6 +563,9 @@ jobs:
|
|
|
562
563
|
- @\*\*飞
|
|
563
564
|
- @\*\*驰
|
|
564
565
|
- @x\*g
|
|
566
|
+
- @\*\*东
|
|
567
|
+
- @\*落
|
|
568
|
+
- @哆\*k
|
|
565
569
|
|
|
566
570
|
(如果您的名字被屏蔽,请通过我的主页电子邮件与我联系,以便使用您的 GitHub 用户名进行更新。)
|
|
567
571
|
|
package/dist/cli.js
CHANGED
|
@@ -67755,7 +67755,7 @@ var require_package3 = __commonJS({
|
|
|
67755
67755
|
"package.json"(exports2, module2) {
|
|
67756
67756
|
module2.exports = {
|
|
67757
67757
|
name: "@musistudio/claude-code-router",
|
|
67758
|
-
version: "1.0.
|
|
67758
|
+
version: "1.0.62",
|
|
67759
67759
|
description: "Use Claude Code without an Anthropics account and route it to another LLM provider",
|
|
67760
67760
|
bin: {
|
|
67761
67761
|
ccr: "dist/cli.js"
|
|
@@ -67775,7 +67775,7 @@ var require_package3 = __commonJS({
|
|
|
67775
67775
|
license: "MIT",
|
|
67776
67776
|
dependencies: {
|
|
67777
67777
|
"@fastify/static": "^8.2.0",
|
|
67778
|
-
"@musistudio/llms": "^1.0.
|
|
67778
|
+
"@musistudio/llms": "^1.0.38",
|
|
67779
67779
|
"@inquirer/prompts": "^5.0.0",
|
|
67780
67780
|
dotenv: "^16.4.7",
|
|
67781
67781
|
"find-process": "^2.0.0",
|
|
@@ -70930,7 +70930,7 @@ var import_os2 = require("os");
|
|
|
70930
70930
|
var import_path4 = require("path");
|
|
70931
70931
|
init_utils();
|
|
70932
70932
|
|
|
70933
|
-
// node_modules/.pnpm/@musistudio+llms@1.0.
|
|
70933
|
+
// node_modules/.pnpm/@musistudio+llms@1.0.38_ws@8.18.3/node_modules/@musistudio/llms/dist/esm/server.mjs
|
|
70934
70934
|
var import_node_fs = require("node:fs");
|
|
70935
70935
|
var import_node_path4 = require("node:path");
|
|
70936
70936
|
var import_node_stream = __toESM(require("node:stream"), 1);
|
|
@@ -79957,7 +79957,7 @@ function $f(r, e, t, n, s) {
|
|
|
79957
79957
|
let f = { method: "POST", headers: a, body: JSON.stringify(e), signal: u };
|
|
79958
79958
|
return t.httpsProxy && (f.dispatcher = new import_undici.ProxyAgent(new URL(t.httpsProxy).toString())), n?.debug({ reqId: s.req.id, request: f, headers: Object.fromEntries(a.entries()), requestUrl: typeof r == "string" ? r : r.toString(), useProxy: t.httpsProxy }, "final request"), fetch(typeof r == "string" ? r : r.toString(), f);
|
|
79959
79959
|
}
|
|
79960
|
-
var Hf = "1.0.
|
|
79960
|
+
var Hf = "1.0.38";
|
|
79961
79961
|
async function l0(r, e, t, n) {
|
|
79962
79962
|
let s = r.body, a = r.provider, u = t._server.providerService.getProvider(a);
|
|
79963
79963
|
if (!u) throw nt(`Provider '${a}' not found`, 404, "provider_not_found");
|
|
@@ -80227,8 +80227,8 @@ var bs = class {
|
|
|
80227
80227
|
this.options = e;
|
|
80228
80228
|
this.useBearer = this.options?.UseBearer ?? false;
|
|
80229
80229
|
}
|
|
80230
|
-
|
|
80231
|
-
|
|
80230
|
+
name = "Anthropic";
|
|
80231
|
+
endPoint = "/v1/messages";
|
|
80232
80232
|
useBearer;
|
|
80233
80233
|
async auth(e, t) {
|
|
80234
80234
|
let n = {};
|
|
@@ -82419,13 +82419,13 @@ var getUseModel = async (req, tokenCount, config, lastUsage) => {
|
|
|
82419
82419
|
req.log.info(`Using background model for ${req.body.model}`);
|
|
82420
82420
|
return config.Router.background;
|
|
82421
82421
|
}
|
|
82422
|
+
if (Array.isArray(req.body.tools) && req.body.tools.some((tool) => tool.type?.startsWith("web_search")) && config.Router.webSearch) {
|
|
82423
|
+
return config.Router.webSearch;
|
|
82424
|
+
}
|
|
82422
82425
|
if (req.body.thinking && config.Router.think) {
|
|
82423
82426
|
req.log.info(`Using think model for ${req.body.thinking}`);
|
|
82424
82427
|
return config.Router.think;
|
|
82425
82428
|
}
|
|
82426
|
-
if (Array.isArray(req.body.tools) && req.body.tools.some((tool) => tool.type?.startsWith("web_search")) && config.Router.webSearch) {
|
|
82427
|
-
return config.Router.webSearch;
|
|
82428
|
-
}
|
|
82429
82429
|
return config.Router.default;
|
|
82430
82430
|
};
|
|
82431
82431
|
var router = async (req, _res, context) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@musistudio/claude-code-router",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"description": "Use Claude Code without an Anthropics account and route it to another LLM provider",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ccr": "dist/cli.js"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@fastify/static": "^8.2.0",
|
|
23
|
-
"@musistudio/llms": "^1.0.
|
|
23
|
+
"@musistudio/llms": "^1.0.38",
|
|
24
24
|
"@inquirer/prompts": "^5.0.0",
|
|
25
25
|
"dotenv": "^16.4.7",
|
|
26
26
|
"find-process": "^2.0.0",
|