Support 128k max tokens for openrouter thinking

This commit is contained in:
Matt Rubens 2025-03-03 09:37:55 -05:00
parent 6cf420235d
commit 63cecf8b22
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ describe("OpenRouterHandler", () => {
openRouterModelId: "test-model",
openRouterModelInfo: {
...mockOpenRouterModelInfo,
maxTokens: 64_000,
maxTokens: 128_000,
thinking: true,
},
modelMaxTokens: 32_768,

View file

@ -263,7 +263,7 @@ export async function getOpenRouterModels() {
modelInfo.supportsPromptCache = true
modelInfo.cacheWritesPrice = 3.75
modelInfo.cacheReadsPrice = 0.3
modelInfo.maxTokens = rawModel.id === "anthropic/claude-3.7-sonnet:thinking" ? 64_000 : 16_384
modelInfo.maxTokens = rawModel.id === "anthropic/claude-3.7-sonnet:thinking" ? 128_000 : 16_384
break
case rawModel.id.startsWith("anthropic/claude-3.5-sonnet-20240620"):
modelInfo.supportsPromptCache = true