Skip to content

Commit 718a75a

Browse files
committed
feat(openrouter): cap horizon-alpha default output to 32k
1 parent 01f5320 commit 718a75a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/shared/api.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ export const getModelMaxOutputTokens = ({
6565
settings?: ProviderSettings
6666
format?: "anthropic" | "openai" | "gemini" | "openrouter"
6767
}): number | undefined => {
68+
// Special-case: Slack request to cap OpenRouter horizon-alpha default output to 32k
69+
// Only applies when routed via OpenRouter and the model id is exactly "openrouter/horizon-alpha"
70+
if (format === "openrouter" && modelId === "openrouter/horizon-alpha") {
71+
return 32_000
72+
}
73+
6874
// Check for Claude Code specific max output tokens setting
6975
if (settings?.apiProvider === "claude-code") {
7076
return settings.claudeCodeMaxOutputTokens || CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS

0 commit comments

Comments
 (0)