refactor(registry): B2 migrate to LiteLLM-style schema — unified models[] with kind field
- 71 registry files: flat `media.*Config.models` → `models[]` with `kind` field - `media` wrapper removed → serviceKinds, *Config fields promoted top-level - `type` field renamed to `kind` (llm/image/tts/stt/embedding/embedding/video/music) - providers/index.js: PROVIDER_MEDIA now built from flat top-level media fields - shared/constants/providers.js: buildProviderEntry reads flat top-level media fields - route /v1/models: modelKind() uses kind||type; removed subConfig merge block - models/info route: removed sub-config fallback lookup (all models in PROVIDER_MODELS) - ttsProviders/index.js: synthesizeViaConfig reads tts models from PROVIDER_MODELS - test-models route, helpers.js, validate route: kind||type compat - Baselines: PROVIDERS 62/62 ✅, Alias 90/90 ✅ Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,36 +1,39 @@
|
||||
|
||||
export default {
|
||||
"id": "vercel-ai-gateway",
|
||||
"alias": "vercel-ai-gateway",
|
||||
id: "vercel-ai-gateway",
|
||||
alias: "vercel-ai-gateway",
|
||||
aliases: [
|
||||
"vercel",
|
||||
],
|
||||
uiAlias: "vercel",
|
||||
display: {
|
||||
"name": "Vercel AI Gateway",
|
||||
"icon": "deployed_code",
|
||||
"color": "#111827",
|
||||
"textIcon": "VG",
|
||||
"website": "https://vercel.com/ai-gateway",
|
||||
"notice": {
|
||||
"text": "Unified OpenAI-compatible endpoint from Vercel. Use your AI Gateway API key, then pick models with provider/model IDs like anthropic/claude-sonnet-4.6 or openai/gpt-5.4.",
|
||||
"apiKeyUrl": "https://vercel.com/dashboard/~/ai-gateway"
|
||||
}
|
||||
name: "Vercel AI Gateway",
|
||||
icon: "deployed_code",
|
||||
color: "#111827",
|
||||
textIcon: "VG",
|
||||
website: "https://vercel.com/ai-gateway",
|
||||
notice: {
|
||||
text: "Unified OpenAI-compatible endpoint from Vercel. Use your AI Gateway API key, then pick models with provider/model IDs like anthropic/claude-sonnet-4.6 or openai/gpt-5.4.",
|
||||
apiKeyUrl: "https://vercel.com/dashboard/~/ai-gateway",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
uiAlias: "vercel",
|
||||
passthroughModels: true,
|
||||
aliases: ["vercel"],
|
||||
"transport": {
|
||||
"baseUrl": "https://ai-gateway.vercel.sh/v1/chat/completions",
|
||||
"retry": {
|
||||
"429": 2
|
||||
transport: {
|
||||
baseUrl: "https://ai-gateway.vercel.sh/v1/chat/completions",
|
||||
retry: {
|
||||
"429": 2,
|
||||
},
|
||||
usage: {
|
||||
url: "https://ai-gateway.vercel.sh/v1/credits",
|
||||
},
|
||||
usage: { url: "https://ai-gateway.vercel.sh/v1/credits" }
|
||||
},
|
||||
media: {
|
||||
serviceKinds: ["llm", "embedding", "image", "imageToText", "webSearch"],
|
||||
searchViaChat: { defaultModel: "openai/gpt-4o-mini", pricingUrl: "https://vercel.com/docs/ai-gateway/pricing" },
|
||||
modelsFetcher: { url: "https://ai-gateway.vercel.sh/v1/models", type: "openai" },
|
||||
imageConfig: { baseUrl: "https://ai-gateway.vercel.sh/v1/images/generations" },
|
||||
embeddingConfig: { baseUrl: "https://ai-gateway.vercel.sh/v1/embeddings" },
|
||||
passthroughModels: true
|
||||
serviceKinds: ["llm","embedding","image","imageToText","webSearch"],
|
||||
embeddingConfig: { baseUrl: "https://ai-gateway.vercel.sh/v1/embeddings" },
|
||||
imageConfig: { baseUrl: "https://ai-gateway.vercel.sh/v1/images/generations" },
|
||||
searchViaChat: { defaultModel: "openai/gpt-4o-mini", pricingUrl: "https://vercel.com/docs/ai-gateway/pricing" },
|
||||
modelsFetcher: { url: "https://ai-gateway.vercel.sh/v1/models", type: "openai" },
|
||||
passthroughModels: true,
|
||||
features: {
|
||||
usage: true,
|
||||
usageApikey: true,
|
||||
},
|
||||
features: {"usage":true,"usageApikey":true},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user