add release command
This commit is contained in:
@@ -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/"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user