release v1.0.15
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@musistudio/claude-code-router",
|
"name": "@musistudio/claude-code-router",
|
||||||
"version": "1.0.14",
|
"version": "1.0.15",
|
||||||
"description": "Use Claude Code without an Anthropics account and route it to another LLM provider",
|
"description": "Use Claude Code without an Anthropics account and route it to another LLM provider",
|
||||||
"bin": {
|
"bin": {
|
||||||
"ccr": "./dist/cli.js"
|
"ccr": "./dist/cli.js"
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"author": "musistudio",
|
"author": "musistudio",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@musistudio/llms": "^1.0.3",
|
"@musistudio/llms": "^1.0.4",
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"tiktoken": "^1.0.21",
|
"tiktoken": "^1.0.21",
|
||||||
"uuid": "^11.1.0"
|
"uuid": "^11.1.0"
|
||||||
|
|||||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -9,8 +9,8 @@ importers:
|
|||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@musistudio/llms':
|
'@musistudio/llms':
|
||||||
specifier: ^1.0.3
|
specifier: ^1.0.4
|
||||||
version: 1.0.3(ws@8.18.3)(zod@3.25.67)
|
version: 1.0.4(ws@8.18.3)(zod@3.25.67)
|
||||||
dotenv:
|
dotenv:
|
||||||
specifier: ^16.4.7
|
specifier: ^16.4.7
|
||||||
version: 16.6.1
|
version: 16.6.1
|
||||||
@@ -214,8 +214,8 @@ packages:
|
|||||||
'@modelcontextprotocol/sdk':
|
'@modelcontextprotocol/sdk':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@musistudio/llms@1.0.3':
|
'@musistudio/llms@1.0.4':
|
||||||
resolution: {integrity: sha512-3230waQJFoOWn1scRyR8SIL/lYX6+Vq1PIfom5Tdf6QO3BzLWkR8NPTXok+cdjXgVIBJN5WWhdBGfp2BCXVCTQ==}
|
resolution: {integrity: sha512-z+Ge5NOaafIvgnGiZqySSz8b2sYIvRQRCVZHZH/IjotS2uQWXespcdIUu0h72toTRkLu7hVIxLuY5Poh+6PeTQ==}
|
||||||
|
|
||||||
abstract-logging@2.0.1:
|
abstract-logging@2.0.1:
|
||||||
resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==}
|
resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==}
|
||||||
@@ -634,7 +634,7 @@ snapshots:
|
|||||||
- supports-color
|
- supports-color
|
||||||
- utf-8-validate
|
- utf-8-validate
|
||||||
|
|
||||||
'@musistudio/llms@1.0.3(ws@8.18.3)(zod@3.25.67)':
|
'@musistudio/llms@1.0.4(ws@8.18.3)(zod@3.25.67)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@anthropic-ai/sdk': 0.54.0
|
'@anthropic-ai/sdk': 0.54.0
|
||||||
'@fastify/cors': 11.0.1
|
'@fastify/cors': 11.0.1
|
||||||
|
|||||||
@@ -47,20 +47,21 @@ export const readConfigFile = async () => {
|
|||||||
const config = await fs.readFile(CONFIG_FILE, "utf-8");
|
const config = await fs.readFile(CONFIG_FILE, "utf-8");
|
||||||
return JSON.parse(config);
|
return JSON.parse(config);
|
||||||
} catch {
|
} catch {
|
||||||
const apiKey = await question("Enter OPENAI_API_KEY: ");
|
const name = await question("Enter Provider Name: ");
|
||||||
const baseUrl = await question("Enter OPENAI_BASE_URL: ");
|
const apiKey = await question("Enter Provider API KEY: ");
|
||||||
const model = await question("Enter OPENAI_MODEL: ");
|
const baseUrl = await question("Enter Provider URL: ");
|
||||||
|
const model = await question("Enter MODEL Name: ");
|
||||||
const config = Object.assign({}, DEFAULT_CONFIG, {
|
const config = Object.assign({}, DEFAULT_CONFIG, {
|
||||||
Providers: [
|
Providers: [
|
||||||
{
|
{
|
||||||
name: "openai",
|
name,
|
||||||
api_base_url: baseUrl,
|
api_base_url: baseUrl,
|
||||||
api_key: apiKey,
|
api_key: apiKey,
|
||||||
models: [model],
|
models: [model],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
Router: {
|
Router: {
|
||||||
default: `openai,${model}`,
|
default: `${name},${model}`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
await writeConfigFile(config);
|
await writeConfigFile(config);
|
||||||
|
|||||||
Reference in New Issue
Block a user