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,70 +1,42 @@
|
||||
|
||||
export default {
|
||||
"id": "xiaomi-tokenplan",
|
||||
"alias": "xiaomi-tokenplan",
|
||||
id: "xiaomi-tokenplan",
|
||||
alias: "xiaomi-tokenplan",
|
||||
aliases: [
|
||||
"xmtp",
|
||||
],
|
||||
uiAlias: "xmtp",
|
||||
display: {
|
||||
"name": "Xiaomi MiMo (Token Plan)",
|
||||
"icon": "smart_toy",
|
||||
"color": "#FF6700",
|
||||
"textIcon": "XT",
|
||||
"website": "https://mimo.xiaomi.com",
|
||||
"notice": {
|
||||
"text": "Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.",
|
||||
"apiKeyUrl": "https://mimo.xiaomi.com"
|
||||
}
|
||||
name: "Xiaomi MiMo (Token Plan)",
|
||||
icon: "smart_toy",
|
||||
color: "#FF6700",
|
||||
textIcon: "XT",
|
||||
website: "https://mimo.xiaomi.com",
|
||||
notice: {
|
||||
text: "Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.",
|
||||
apiKeyUrl: "https://mimo.xiaomi.com",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
uiAlias: "xmtp",
|
||||
hasProviderSpecificData: true,
|
||||
defaultRegion: "sgp",
|
||||
aliases: ["xmtp"],
|
||||
"transport": {
|
||||
"baseUrl": "https://token-plan-sgp.xiaomimimo.com/v1/chat/completions",
|
||||
transport: {
|
||||
baseUrl: "https://token-plan-sgp.xiaomimimo.com/v1/chat/completions",
|
||||
regions: {
|
||||
sgp: "https://token-plan-sgp.xiaomimimo.com/v1",
|
||||
cn: "https://token-plan-cn.xiaomimimo.com/v1",
|
||||
ams: "https://token-plan-ams.xiaomimimo.com/v1"
|
||||
ams: "https://token-plan-ams.xiaomimimo.com/v1",
|
||||
},
|
||||
defaultRegion: "sgp"
|
||||
defaultRegion: "sgp",
|
||||
},
|
||||
"models": [
|
||||
{
|
||||
"id": "mimo-v2.5-pro",
|
||||
"name": "MiMo V2.5 Pro"
|
||||
},
|
||||
{
|
||||
"id": "mimo-v2.5-pro-claude",
|
||||
"name": "MiMo V2.5 Pro (Claude Native)",
|
||||
"targetFormat": "claude",
|
||||
"upstreamModelId": "mimo-v2.5-pro"
|
||||
},
|
||||
{
|
||||
"id": "mimo-v2.5",
|
||||
"name": "MiMo V2.5"
|
||||
},
|
||||
{
|
||||
"id": "mimo-v2-pro",
|
||||
"name": "MiMo V2 Pro"
|
||||
},
|
||||
{
|
||||
"id": "mimo-v2-omni",
|
||||
"name": "MiMo V2 Omni"
|
||||
},
|
||||
{
|
||||
"id": "mimo-v2-tts",
|
||||
"name": "MiMo V2 TTS"
|
||||
},
|
||||
{
|
||||
"id": "mimo-v2.5-tts",
|
||||
"name": "MiMo V2.5 TTS"
|
||||
},
|
||||
{
|
||||
"id": "mimo-v2.5-tts-voiceclone",
|
||||
"name": "MiMo V2.5 TTS Voice Clone"
|
||||
},
|
||||
{
|
||||
"id": "mimo-v2.5-tts-voicedesign",
|
||||
"name": "MiMo V2.5 TTS Voice Design"
|
||||
}
|
||||
]
|
||||
models: [
|
||||
{ id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" },
|
||||
{ id: "mimo-v2.5-pro-claude", name: "MiMo V2.5 Pro (Claude Native)", targetFormat: "claude", upstreamModelId: "mimo-v2.5-pro" },
|
||||
{ id: "mimo-v2.5", name: "MiMo V2.5" },
|
||||
{ id: "mimo-v2-pro", name: "MiMo V2 Pro" },
|
||||
{ id: "mimo-v2-omni", name: "MiMo V2 Omni" },
|
||||
{ id: "mimo-v2-tts", name: "MiMo V2 TTS" },
|
||||
{ id: "mimo-v2.5-tts", name: "MiMo V2.5 TTS" },
|
||||
{ id: "mimo-v2.5-tts-voiceclone", name: "MiMo V2.5 TTS Voice Clone" },
|
||||
{ id: "mimo-v2.5-tts-voicedesign", name: "MiMo V2.5 TTS Voice Design" },
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user