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,35 +1,31 @@
|
||||
|
||||
export default {
|
||||
"id": "qwen", alias: "qw", display: { name: "Qwen Code", icon: "psychology", color: "#10B981", website: "https://chat.qwen.ai", notice: { signupUrl: "https://chat.qwen.ai" } },
|
||||
id: "qwen",
|
||||
alias: "qw",
|
||||
display: {
|
||||
name: "Qwen Code",
|
||||
icon: "psychology",
|
||||
color: "#10B981",
|
||||
website: "https://chat.qwen.ai",
|
||||
notice: {
|
||||
signupUrl: "https://chat.qwen.ai",
|
||||
},
|
||||
},
|
||||
category: "oauth",
|
||||
"transport": {
|
||||
"baseUrl": "https://portal.qwen.ai/v1/chat/completions"
|
||||
transport: {
|
||||
baseUrl: "https://portal.qwen.ai/v1/chat/completions",
|
||||
},
|
||||
"oauth": {
|
||||
"clientId": "f0304373b74a44d2b584a3fb70ca9e56",
|
||||
"deviceCodeUrl": "https://chat.qwen.ai/api/v1/oauth2/device/code",
|
||||
"tokenUrl": "https://chat.qwen.ai/api/v1/oauth2/token",
|
||||
"scope": "openid profile email model.completion",
|
||||
"codeChallengeMethod": "S256"
|
||||
,
|
||||
refreshLeadMs: 1200000
|
||||
models: [
|
||||
{ id: "qwen3-coder-plus", name: "Qwen3 Coder Plus" },
|
||||
{ id: "qwen3-coder-flash", name: "Qwen3 Coder Flash" },
|
||||
{ id: "vision-model", name: "Qwen3 Vision Model" },
|
||||
{ id: "coder-model", name: "Qwen3.6 Coder Model" },
|
||||
],
|
||||
oauth: {
|
||||
clientId: "f0304373b74a44d2b584a3fb70ca9e56",
|
||||
deviceCodeUrl: "https://chat.qwen.ai/api/v1/oauth2/device/code",
|
||||
tokenUrl: "https://chat.qwen.ai/api/v1/oauth2/token",
|
||||
scope: "openid profile email model.completion",
|
||||
codeChallengeMethod: "S256",
|
||||
refreshLeadMs: 1200000,
|
||||
},
|
||||
"models": [
|
||||
{
|
||||
"id": "qwen3-coder-plus",
|
||||
"name": "Qwen3 Coder Plus"
|
||||
},
|
||||
{
|
||||
"id": "qwen3-coder-flash",
|
||||
"name": "Qwen3 Coder Flash"
|
||||
},
|
||||
{
|
||||
"id": "vision-model",
|
||||
"name": "Qwen3 Vision Model"
|
||||
},
|
||||
{
|
||||
"id": "coder-model",
|
||||
"name": "Qwen3.6 Coder Model"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user