add release command

This commit is contained in:
musi
2025-07-21 16:48:30 +08:00
parent 194a664f20
commit b9d556ff1b
2 changed files with 6 additions and 5 deletions

View File

@@ -1,12 +1,13 @@
{
"name": "@musistudio/claude-code-router",
"version": "1.0.24",
"version": "1.0.25",
"description": "Use Claude Code without an Anthropics account and route it to another LLM provider",
"bin": {
"ccr": "./dist/cli.js"
},
"scripts": {
"build": "esbuild src/cli.ts --bundle --platform=node --outfile=dist/cli.js && shx cp node_modules/tiktoken/tiktoken_bg.wasm dist/tiktoken_bg.wasm"
"build": "esbuild src/cli.ts --bundle --platform=node --outfile=dist/cli.js && shx cp node_modules/tiktoken/tiktoken_bg.wasm dist/tiktoken_bg.wasm",
"release": "npm run build && npm publish"
},
"keywords": [
"claude",
@@ -37,4 +38,4 @@
"screenshots/"
]
}
}
}

View File

@@ -64,7 +64,7 @@ const calculateTokenCount = (
return tokenCount;
};
const getUseModel = (req: any, tokenCount: number, config: any) => {
const getUseModel = async (req: any, tokenCount: number, config: any) => {
if (req.body.model.includes(",")) {
return req.body.model;
}
@@ -115,7 +115,7 @@ export const router = async (req: any, _res: any, config: any) => {
}
}
if (!model) {
model = getUseModel(req, tokenCount, config);
model = await getUseModel(req, tokenCount, config);
}
req.body.model = model;
} catch (error: any) {