Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 8 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -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 ' ')
Expand Down
3 changes: 2 additions & 1 deletion src/api/providers/openrouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,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
Expand Down
Loading