Skip to content

Commit 7d93904

Browse files
committed
feat(openrouter): add support for reasoning budget in Claude Haiku 4.5
1 parent e965e00 commit 7d93904

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

packages/types/src/providers/openrouter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export const OPEN_ROUTER_REASONING_BUDGET_MODELS = new Set([
8484
"anthropic/claude-opus-4.1",
8585
"anthropic/claude-sonnet-4",
8686
"anthropic/claude-sonnet-4.5",
87+
"anthropic/claude-haiku-4.5",
8788
"google/gemini-2.5-pro-preview",
8889
"google/gemini-2.5-pro",
8990
"google/gemini-2.5-flash-preview-05-20",

src/api/providers/fetchers/openrouter.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,13 @@ export const parseOpenRouterModel = ({
253253
modelInfo.maxTokens = anthropicModels["claude-opus-4-1-20250805"].maxTokens
254254
}
255255

256+
// Ensure correct reasoning handling for Claude Haiku 4.5 on OpenRouter
257+
// Use budget control and disable effort-based reasoning fallback
258+
if (id === "anthropic/claude-haiku-4.5") {
259+
modelInfo.supportsReasoningBudget = true
260+
modelInfo.supportsReasoningEffort = false
261+
}
262+
256263
// Set horizon-alpha model to 32k max tokens
257264
if (id === "openrouter/horizon-alpha") {
258265
modelInfo.maxTokens = 32768

0 commit comments

Comments
 (0)