fix(provider): support openrouter reasoning budgets

This commit is contained in:
Aiden Cline
2026-06-30 16:59:56 -05:00
parent eb6efbccfd
commit e9c243cb67
2 changed files with 23 additions and 0 deletions
@@ -751,6 +751,9 @@ function reasoningOptionVariants(model: Provider.Model): Record<string, Record<s
if (!budget) return {}
switch (model.api.npm) {
case "@openrouter/ai-sdk-provider":
return reasoningBudgetVariants(budget, (max_tokens) => ({ reasoning: { max_tokens } }), model.limit.output)
case "@ai-sdk/gateway":
if (idIncludes(model, "anthropic")) {
return reasoningBudgetVariants(