@musistudio/claude-code-router 1.0.59 → 1.0.60
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 +27 -0
- package/dist/cli.js +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
- **Multi-Provider Support**: Supports various model providers like OpenRouter, DeepSeek, Ollama, Gemini, Volcengine, and SiliconFlow.
|
|
25
25
|
- **Request/Response Transformation**: Customize requests and responses for different providers using transformers.
|
|
26
26
|
- **Dynamic Model Switching**: Switch models on-the-fly within Claude Code using the `/model` command.
|
|
27
|
+
- **CLI Model Management**: Manage models and providers directly from the terminal with `ccr model`.
|
|
27
28
|
- **GitHub Actions Integration**: Trigger Claude Code tasks in your GitHub workflows.
|
|
28
29
|
- **Plugin System**: Extend functionality with custom transformers.
|
|
29
30
|
|
|
@@ -229,6 +230,32 @@ This will open a web-based interface where you can easily view and edit your `co
|
|
|
229
230
|
|
|
230
231
|

|
|
231
232
|
|
|
233
|
+
### 5. CLI Model Management
|
|
234
|
+
|
|
235
|
+
For users who prefer terminal-based workflows, you can use the interactive CLI model selector:
|
|
236
|
+
|
|
237
|
+
```shell
|
|
238
|
+
ccr model
|
|
239
|
+
```
|
|
240
|
+

|
|
241
|
+
|
|
242
|
+
This command provides an interactive interface to:
|
|
243
|
+
|
|
244
|
+
- View current configuration:
|
|
245
|
+
- See all configured models (default, background, think, longContext, webSearch, image)
|
|
246
|
+
- Switch models: Quickly change which model is used for each router type
|
|
247
|
+
- Add new models: Add models to existing providers
|
|
248
|
+
- Create new providers: Set up complete provider configurations including:
|
|
249
|
+
- Provider name and API endpoint
|
|
250
|
+
- API key
|
|
251
|
+
- Available models
|
|
252
|
+
- Transformer configuration with support for:
|
|
253
|
+
- Multiple transformers (openrouter, deepseek, gemini, etc.)
|
|
254
|
+
- Transformer options (e.g., maxtoken with custom limits)
|
|
255
|
+
- Provider-specific routing (e.g., OpenRouter provider preferences)
|
|
256
|
+
|
|
257
|
+
The CLI tool validates all inputs and provides helpful prompts to guide you through the configuration process, making it easy to manage complex setups without editing JSON files manually.
|
|
258
|
+
|
|
232
259
|
#### Providers
|
|
233
260
|
|
|
234
261
|
The `Providers` array is where you define the different model providers you want to use. Each provider object requires:
|
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.60",
|
|
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.37",
|
|
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.37_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.37";
|
|
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
|
-
endPoint = "/v1/messages";
|
|
80230
|
+
static TransformerName = "Anthropic";
|
|
80231
|
+
static endPoint = "/v1/messages";
|
|
80232
80232
|
useBearer;
|
|
80233
80233
|
async auth(e, t) {
|
|
80234
80234
|
let n = {};
|
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.60",
|
|
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.37",
|
|
24
24
|
"@inquirer/prompts": "^5.0.0",
|
|
25
25
|
"dotenv": "^16.4.7",
|
|
26
26
|
"find-process": "^2.0.0",
|