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:
@@ -105,7 +105,8 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig {
|
||||
avail.copilot ||
|
||||
avail.zai ||
|
||||
avail.kimiForCoding ||
|
||||
avail.opencodeGo
|
||||
avail.opencodeGo ||
|
||||
avail.vercelAiGateway
|
||||
if (!hasAnyProvider) {
|
||||
return {
|
||||
$schema: SCHEMA_URL,
|
||||
@@ -130,6 +131,8 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig {
|
||||
agentConfig = { model: "opencode-go/minimax-m2.7" }
|
||||
} else if (avail.zai) {
|
||||
agentConfig = { model: ZAI_MODEL }
|
||||
} else if (avail.vercelAiGateway) {
|
||||
agentConfig = { model: "vercel/anthropic/claude-haiku-4.5" }
|
||||
}
|
||||
if (agentConfig) {
|
||||
agents[role] = attachAllFallbackModels(agentConfig, req.fallbackChain, avail)
|
||||
@@ -145,6 +148,8 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig {
|
||||
agentConfig = { model: "opencode/claude-haiku-4-5" }
|
||||
} else if (avail.opencodeGo) {
|
||||
agentConfig = { model: "opencode-go/minimax-m2.7" }
|
||||
} else if (avail.vercelAiGateway) {
|
||||
agentConfig = { model: "vercel/anthropic/claude-haiku-4.5" }
|
||||
} else if (avail.copilot) {
|
||||
agentConfig = { model: "github-copilot/gpt-5-mini" }
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user