fix(provider): route gateway variants by api id (#36614)

This commit is contained in:
Aiden Cline
2026-07-13 00:08:08 -05:00
committed by GitHub
parent 8036440693
commit 8168f0f0f6
2 changed files with 40 additions and 4 deletions
+4 -4
View File
@@ -759,7 +759,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
}
case "@ai-sdk/gateway":
if (model.id.includes("anthropic")) {
if (model.api.id.includes("anthropic")) {
if (adaptiveEfforts) {
return Object.fromEntries(
adaptiveEfforts.map((effort) => [
@@ -792,8 +792,8 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
},
}
}
if (model.id.includes("google")) {
if (id.includes("2.5")) {
if (model.api.id.includes("google")) {
if (model.api.id.includes("2.5")) {
return {
high: {
thinkingConfig: {
@@ -804,7 +804,7 @@ export function variants(model: Provider.Model): Record<string, Record<string, a
max: {
thinkingConfig: {
includeThoughts: true,
thinkingBudget: googleThinkingBudgetMax(id),
thinkingBudget: googleThinkingBudgetMax(model.api.id.toLowerCase()),
},
},
}