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,86 +1,49 @@
export default {
"id": "iflow", alias: "if", display: { name: "iFlow AI", icon: "water_drop", color: "#6366F1", website: "https://iflow.cn", notice: { signupUrl: "https://iflow.cn" } },
id: "iflow",
alias: "if",
display: {
name: "iFlow AI",
icon: "water_drop",
color: "#6366F1",
website: "https://iflow.cn",
notice: {
signupUrl: "https://iflow.cn",
},
},
category: "oauth",
"transport": {
"baseUrl": "https://apis.iflow.cn/v1/chat/completions",
"headers": {
"User-Agent": "iFlow-Cli"
}
transport: {
baseUrl: "https://apis.iflow.cn/v1/chat/completions",
headers: {
"User-Agent": "iFlow-Cli",
},
},
"oauth": {
"clientId": "10009311001",
"clientSecret": "4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",
"authorizeUrl": "https://iflow.cn/oauth",
"tokenUrl": "https://iflow.cn/oauth/token",
"userInfoUrl": "https://iflow.cn/api/oauth/getUserInfo",
"extraParams": {
"loginMethod": "phone",
"type": "phone"
}
,
refreshLeadMs: 86400000
models: [
{ id: "qwen3-coder-plus", name: "Qwen3 Coder Plus" },
{ id: "qwen3-max", name: "Qwen3 Max" },
{ id: "qwen3-vl-plus", name: "Qwen3 VL Plus" },
{ id: "qwen3-max-preview", name: "Qwen3 Max Preview" },
{ id: "qwen3-235b", name: "Qwen3 235B A22B" },
{ id: "qwen3-235b-a22b-instruct", name: "Qwen3 235B A22B Instruct" },
{ id: "qwen3-235b-a22b-thinking-2507", name: "Qwen3 235B A22B Thinking" },
{ id: "qwen3-32b", name: "Qwen3 32B" },
{ id: "kimi-k2", name: "Kimi K2" },
{ id: "deepseek-v3.2", name: "DeepSeek V3.2 Exp" },
{ id: "deepseek-v3.1", name: "DeepSeek V3.1 Terminus" },
{ id: "deepseek-v3", name: "DeepSeek V3 671B" },
{ id: "deepseek-r1", name: "DeepSeek R1" },
{ id: "glm-4.7", name: "GLM 4.7" },
{ id: "iflow-rome-30ba3b", name: "iFlow ROME" },
],
oauth: {
clientId: "10009311001",
clientSecret: "4Z3YjXycVsQvyGF1etiNlIBB4RsqSDtW",
authorizeUrl: "https://iflow.cn/oauth",
tokenUrl: "https://iflow.cn/oauth/token",
userInfoUrl: "https://iflow.cn/api/oauth/getUserInfo",
extraParams: {
loginMethod: "phone",
type: "phone",
},
refreshLeadMs: 86400000,
},
"models": [
{
"id": "qwen3-coder-plus",
"name": "Qwen3 Coder Plus"
},
{
"id": "qwen3-max",
"name": "Qwen3 Max"
},
{
"id": "qwen3-vl-plus",
"name": "Qwen3 VL Plus"
},
{
"id": "qwen3-max-preview",
"name": "Qwen3 Max Preview"
},
{
"id": "qwen3-235b",
"name": "Qwen3 235B A22B"
},
{
"id": "qwen3-235b-a22b-instruct",
"name": "Qwen3 235B A22B Instruct"
},
{
"id": "qwen3-235b-a22b-thinking-2507",
"name": "Qwen3 235B A22B Thinking"
},
{
"id": "qwen3-32b",
"name": "Qwen3 32B"
},
{
"id": "kimi-k2",
"name": "Kimi K2"
},
{
"id": "deepseek-v3.2",
"name": "DeepSeek V3.2 Exp"
},
{
"id": "deepseek-v3.1",
"name": "DeepSeek V3.1 Terminus"
},
{
"id": "deepseek-v3",
"name": "DeepSeek V3 671B"
},
{
"id": "deepseek-r1",
"name": "DeepSeek R1"
},
{
"id": "glm-4.7",
"name": "GLM 4.7"
},
{
"id": "iflow-rome-30ba3b",
"name": "iFlow ROME"
}
]
};