Add Vercel AI Gateway provider support (#1183)

This commit is contained in:
Ngô Tấn Tài
2026-05-17 15:16:25 +07:00
committed by GitHub
parent a168313290
commit 9326589452
7 changed files with 20 additions and 0 deletions
+7
View File
@@ -251,6 +251,13 @@ export async function POST(request) {
isValid = openaiRes.ok;
break;
case "vercel-ai-gateway":
const vercelAiGatewayRes = await fetch("https://ai-gateway.vercel.sh/v1/models", {
headers: { "Authorization": `Bearer ${apiKey}` },
});
isValid = vercelAiGatewayRes.ok;
break;
case "anthropic":
const anthropicRes = await fetch("https://api.anthropic.com/v1/messages", {
method: "POST",