mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Corrected bug in openrouter.ts and pre-commit and pre-push husky scripts (#1853)
- Corrected error causing free models listed under openrouter to show pricing information - Updated pre-push and pre-commit scripts to work in Windows environments when pushing to branch (windows requires npm/npx to include the ".cmd" extension to recognize and compile.
This commit is contained in:
parent
b41dd739f3
commit
87b9b72b32
3 changed files with 18 additions and 3 deletions
|
|
@ -5,4 +5,11 @@ if [ "$branch" = "main" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
npx lint-staged
|
||||
# Detect if running on Windows and use npx.cmd, otherwise use npx
|
||||
if [ "$OS" = "Windows_NT" ]; then
|
||||
npx_cmd="npx.cmd"
|
||||
else
|
||||
npx_cmd="npx"
|
||||
fi
|
||||
|
||||
"$npx_cmd" lint-staged
|
||||
|
|
@ -5,7 +5,14 @@ if [ "$branch" = "main" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
npm run compile
|
||||
# Detect if running on Windows and use npm.cmd, otherwise use npm
|
||||
if [ "$OS" = "Windows_NT" ]; then
|
||||
npm_cmd="npm.cmd"
|
||||
else
|
||||
npm_cmd="npm"
|
||||
fi
|
||||
|
||||
"$npm_cmd" run compile
|
||||
|
||||
# Check for new changesets.
|
||||
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
|
||||
|
|
|
|||
|
|
@ -256,12 +256,13 @@ export async function getOpenRouterModels(options?: ApiHandlerOptions) {
|
|||
modelInfo.maxTokens = 8192
|
||||
break
|
||||
case rawModel.id.startsWith("anthropic/claude-3-haiku"):
|
||||
default:
|
||||
modelInfo.supportsPromptCache = true
|
||||
modelInfo.cacheWritesPrice = 0.3
|
||||
modelInfo.cacheReadsPrice = 0.03
|
||||
modelInfo.maxTokens = 8192
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
models[rawModel.id] = modelInfo
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue