feat: add Vercel AI Gateway as a provider
Adds 'vercel' as a recognized provider throughout the model resolution system, enabling users with Vercel AI Gateway to use it as a universal fallback for OpenAI, Anthropic, and Google models. The gateway transform infers the sub-provider from canonical model names (claude->anthropic, gpt->openai, gemini->google) and delegates to the appropriate provider-specific transform, producing model strings like vercel/anthropic/claude-opus-4.6.
This commit is contained in:
@@ -110,6 +110,16 @@ export async function promptInstallConfig(detected: DetectedConfig): Promise<Ins
|
||||
})
|
||||
if (!opencodeGo) return null
|
||||
|
||||
const vercelAiGateway = await selectOrCancel({
|
||||
message: "Do you have a Vercel AI Gateway API key?",
|
||||
options: [
|
||||
{ value: "no", label: "No", hint: "Will use other configured providers" },
|
||||
{ value: "yes", label: "Yes", hint: "Universal proxy for OpenAI, Anthropic, Google, etc." },
|
||||
],
|
||||
initialValue: initial.vercelAiGateway,
|
||||
})
|
||||
if (!vercelAiGateway) return null
|
||||
|
||||
return {
|
||||
hasClaude: claude !== "no",
|
||||
isMax20: claude === "max20",
|
||||
@@ -120,5 +130,6 @@ export async function promptInstallConfig(detected: DetectedConfig): Promise<Ins
|
||||
hasZaiCodingPlan: zaiCodingPlan === "yes",
|
||||
hasKimiForCoding: kimiForCoding === "yes",
|
||||
hasOpencodeGo: opencodeGo === "yes",
|
||||
hasVercelAiGateway: vercelAiGateway === "yes",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user