diff --git a/.husky/pre-commit b/.husky/pre-commit index 111a1c0f91..8a87777657 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -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 \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push index a4fea4a34a..79fe13835d 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -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 ' ') diff --git a/src/api/providers/openrouter.ts b/src/api/providers/openrouter.ts index 6d93d0b180..72e4fe576a 100644 --- a/src/api/providers/openrouter.ts +++ b/src/api/providers/openrouter.ts @@ -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