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,83 +1,31 @@
|
||||
|
||||
export default {
|
||||
"id": "black-forest-labs",
|
||||
"alias": "black-forest-labs",
|
||||
id: "black-forest-labs",
|
||||
alias: "black-forest-labs",
|
||||
aliases: [
|
||||
"bfl",
|
||||
],
|
||||
uiAlias: "bfl",
|
||||
display: {
|
||||
"name": "Black Forest Labs",
|
||||
"icon": "image",
|
||||
"color": "#111827",
|
||||
"textIcon": "BF",
|
||||
"website": "https://blackforestlabs.ai",
|
||||
"notice": {
|
||||
"apiKeyUrl": "https://api.bfl.ai"
|
||||
}
|
||||
name: "Black Forest Labs",
|
||||
icon: "image",
|
||||
color: "#111827",
|
||||
textIcon: "BF",
|
||||
website: "https://blackforestlabs.ai",
|
||||
notice: {
|
||||
apiKeyUrl: "https://api.bfl.ai",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
uiAlias: "bfl",
|
||||
authType: "apikey",
|
||||
aliases: ["bfl"],
|
||||
"transport": null,
|
||||
media: {
|
||||
serviceKinds: ["image"],
|
||||
imageConfig: { baseUrl: "https://api.bfl.ai/v1" }
|
||||
},
|
||||
"models": [
|
||||
{
|
||||
"id": "flux-pro-1.1",
|
||||
"name": "FLUX Pro 1.1",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"n",
|
||||
"size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "flux-pro-1.1-ultra",
|
||||
"name": "FLUX Pro 1.1 Ultra",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "flux-pro",
|
||||
"name": "FLUX Pro",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"n",
|
||||
"size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "flux-dev",
|
||||
"name": "FLUX Dev",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"n",
|
||||
"size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "flux-kontext-pro",
|
||||
"name": "FLUX Kontext Pro (Edit)",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"size"
|
||||
],
|
||||
"capabilities": [
|
||||
"edit"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "flux-kontext-max",
|
||||
"name": "FLUX Kontext Max (Edit)",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"size"
|
||||
],
|
||||
"capabilities": [
|
||||
"edit"
|
||||
]
|
||||
}
|
||||
]
|
||||
transport: null,
|
||||
models: [
|
||||
{ id: "flux-pro-1.1", name: "FLUX Pro 1.1", params: ["n","size"], kind: "image" },
|
||||
{ id: "flux-pro-1.1-ultra", name: "FLUX Pro 1.1 Ultra", params: ["size"], kind: "image" },
|
||||
{ id: "flux-pro", name: "FLUX Pro", params: ["n","size"], kind: "image" },
|
||||
{ id: "flux-dev", name: "FLUX Dev", params: ["n","size"], kind: "image" },
|
||||
{ id: "flux-kontext-pro", name: "FLUX Kontext Pro (Edit)", params: ["size"], capabilities: ["edit"], kind: "image" },
|
||||
{ id: "flux-kontext-max", name: "FLUX Kontext Max (Edit)", params: ["size"], capabilities: ["edit"], kind: "image" },
|
||||
],
|
||||
serviceKinds: ["image"],
|
||||
imageConfig: { baseUrl: "https://api.bfl.ai/v1" },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user