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:
decolua
2026-06-14 14:32:59 +07:00
parent e53ce79abb
commit dd1e0f9bcc
82 changed files with 2518 additions and 3651 deletions

View File

@@ -1,73 +1,38 @@
export default {
"id": "grok-web",
"alias": "grok-web",
id: "grok-web",
alias: "grok-web",
aliases: [
"gw",
],
uiAlias: "gw",
display: {
"name": "Grok Web (Subscription)",
"icon": "auto_awesome",
"color": "#1DA1F2",
"textIcon": "GW",
"website": "https://grok.com"
name: "Grok Web (Subscription)",
icon: "auto_awesome",
color: "#1DA1F2",
textIcon: "GW",
website: "https://grok.com",
},
category: "webCookie",
uiAlias: "gw",
authType: "cookie",
authHint: "Paste your sso= cookie value from grok.com",
passthroughModels: true,
aliases: ["gw"],
"transport": {
"baseUrl": "https://grok.com/rest/app-chat/conversations/new",
"format": "grok-web",
"authType": "cookie"
transport: {
baseUrl: "https://grok.com/rest/app-chat/conversations/new",
format: "grok-web",
authType: "cookie",
},
"models": [
{
"id": "grok-3",
"name": "Grok 3"
},
{
"id": "grok-3-mini",
"name": "Grok 3 Mini (Thinking)"
},
{
"id": "grok-3-thinking",
"name": "Grok 3 Thinking"
},
{
"id": "grok-4",
"name": "Grok 4"
},
{
"id": "grok-4-mini",
"name": "Grok 4 Mini (Thinking)"
},
{
"id": "grok-4-thinking",
"name": "Grok 4 Thinking"
},
{
"id": "grok-4-heavy",
"name": "Grok 4 Heavy (SuperGrok)"
},
{
"id": "grok-4.1-mini",
"name": "Grok 4.1 Mini (Thinking)"
},
{
"id": "grok-4.1-fast",
"name": "Grok 4.1 Fast"
},
{
"id": "grok-4.1-expert",
"name": "Grok 4.1 Expert"
},
{
"id": "grok-4.1-thinking",
"name": "Grok 4.1 Thinking"
},
{
"id": "grok-4.2",
"name": "Grok 4.2 (4.20 Beta)"
}
]
models: [
{ id: "grok-3", name: "Grok 3" },
{ id: "grok-3-mini", name: "Grok 3 Mini (Thinking)" },
{ id: "grok-3-thinking", name: "Grok 3 Thinking" },
{ id: "grok-4", name: "Grok 4" },
{ id: "grok-4-mini", name: "Grok 4 Mini (Thinking)" },
{ id: "grok-4-thinking", name: "Grok 4 Thinking" },
{ id: "grok-4-heavy", name: "Grok 4 Heavy (SuperGrok)" },
{ id: "grok-4.1-mini", name: "Grok 4.1 Mini (Thinking)" },
{ id: "grok-4.1-fast", name: "Grok 4.1 Fast" },
{ id: "grok-4.1-expert", name: "Grok 4.1 Expert" },
{ id: "grok-4.1-thinking", name: "Grok 4.1 Thinking" },
{ id: "grok-4.2", name: "Grok 4.2 (4.20 Beta)" },
],
passthroughModels: true,
};