fix: ensure vercel variants pass amazon models under bedrock key (#13631)

This commit is contained in:
Aiden Cline
2026-02-14 13:18:52 -06:00
committed by GitHub
parent 3b6b3e6fc8
commit 933a491ade
2 changed files with 41 additions and 3 deletions

View File

@@ -341,6 +341,36 @@ describe("ProviderTransform.providerOptions", () => {
gateway: { reasoningEffort: "high" },
})
})
test("maps amazon slug to bedrock for provider options", () => {
const model = createModel({
providerID: "vercel",
api: {
id: "amazon/nova-2-lite",
url: "https://ai-gateway.vercel.sh/v3/ai",
npm: "@ai-sdk/gateway",
},
})
expect(ProviderTransform.providerOptions(model, { reasoningConfig: { type: "enabled" } })).toEqual({
bedrock: { reasoningConfig: { type: "enabled" } },
})
})
test("uses groq slug for groq models", () => {
const model = createModel({
providerID: "vercel",
api: {
id: "groq/llama-3.3-70b-versatile",
url: "https://ai-gateway.vercel.sh/v3/ai",
npm: "@ai-sdk/gateway",
},
})
expect(ProviderTransform.providerOptions(model, { reasoningFormat: "parsed" })).toEqual({
groq: { reasoningFormat: "parsed" },
})
})
})
describe("ProviderTransform.schema - gemini array items", () => {