Files
oh-my-opencode/src/cli/model-fallback-types.ts
T
Matan Kushner dac0c99e8c 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.
2026-04-13 11:22:22 +09:00

36 lines
715 B
TypeScript

import type { FallbackModelObject } from "../config/schema/fallback-models"
export interface ProviderAvailability {
native: {
claude: boolean
openai: boolean
gemini: boolean
}
opencodeZen: boolean
copilot: boolean
zai: boolean
kimiForCoding: boolean
opencodeGo: boolean
vercelAiGateway: boolean
isMaxPlan: boolean
}
export interface AgentConfig {
model: string
variant?: string
fallback_models?: FallbackModelObject[]
}
export interface CategoryConfig {
model: string
variant?: string
fallback_models?: FallbackModelObject[]
}
export interface GeneratedOmoConfig {
$schema: string
agents?: Record<string, AgentConfig>
categories?: Record<string, CategoryConfig>
[key: string]: unknown
}