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,67 +1,30 @@
|
||||
|
||||
export default {
|
||||
"id": "stability-ai",
|
||||
"alias": "stability-ai",
|
||||
id: "stability-ai",
|
||||
alias: "stability-ai",
|
||||
aliases: [
|
||||
"stability",
|
||||
],
|
||||
uiAlias: "stability",
|
||||
display: {
|
||||
"name": "Stability AI",
|
||||
"icon": "image",
|
||||
"color": "#8B5CF6",
|
||||
"textIcon": "SA",
|
||||
"website": "https://stability.ai",
|
||||
"notice": {
|
||||
"apiKeyUrl": "https://platform.stability.ai/account/keys"
|
||||
}
|
||||
name: "Stability AI",
|
||||
icon: "image",
|
||||
color: "#8B5CF6",
|
||||
textIcon: "SA",
|
||||
website: "https://stability.ai",
|
||||
notice: {
|
||||
apiKeyUrl: "https://platform.stability.ai/account/keys",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
uiAlias: "stability",
|
||||
authType: "apikey",
|
||||
aliases: ["stability"],
|
||||
"transport": null,
|
||||
media: {
|
||||
serviceKinds: ["image"],
|
||||
imageConfig: { baseUrl: "https://api.stability.ai/v2beta/stable-image/generate" }
|
||||
},
|
||||
"models": [
|
||||
{
|
||||
"id": "stable-image-ultra",
|
||||
"name": "Stable Image Ultra",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "stable-image-core",
|
||||
"name": "Stable Image Core",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"size",
|
||||
"style"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sd3.5-large",
|
||||
"name": "Stable Diffusion 3.5 Large",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sd3.5-large-turbo",
|
||||
"name": "Stable Diffusion 3.5 Large Turbo",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"size"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "sd3.5-medium",
|
||||
"name": "Stable Diffusion 3.5 Medium",
|
||||
"type": "image",
|
||||
"params": [
|
||||
"size"
|
||||
]
|
||||
}
|
||||
]
|
||||
transport: null,
|
||||
models: [
|
||||
{ id: "stable-image-ultra", name: "Stable Image Ultra", params: ["size"], kind: "image" },
|
||||
{ id: "stable-image-core", name: "Stable Image Core", params: ["size","style"], kind: "image" },
|
||||
{ id: "sd3.5-large", name: "Stable Diffusion 3.5 Large", params: ["size"], kind: "image" },
|
||||
{ id: "sd3.5-large-turbo", name: "Stable Diffusion 3.5 Large Turbo", params: ["size"], kind: "image" },
|
||||
{ id: "sd3.5-medium", name: "Stable Diffusion 3.5 Medium", params: ["size"], kind: "image" },
|
||||
],
|
||||
serviceKinds: ["image"],
|
||||
imageConfig: { baseUrl: "https://api.stability.ai/v2beta/stable-image/generate" },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user