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

@@ -3,33 +3,68 @@ import { withCodexReviewModels } from "../models/helpers.js";
export default {
id: "codex",
alias: "cx",
uiAlias: "cx",
display: {
"name": "OpenAI Codex",
"icon": "code",
"color": "#3B82F6",
"website": "https://chatgpt.com/codex",
"notice": {
"signupUrl": "https://chatgpt.com/codex"
},
"deprecated": true,
"deprecationNotice": "RISK_NOTICE",
"kindNotice": {
"image": "Requires a ChatGPT Plus (or higher) account. Free accounts are not supported for image generation."
}
name: "OpenAI Codex",
icon: "code",
color: "#3B82F6",
website: "https://chatgpt.com/codex",
notice: {
signupUrl: "https://chatgpt.com/codex",
},
deprecated: true,
deprecationNotice: "RISK_NOTICE",
kindNotice: {
image: "Requires a ChatGPT Plus (or higher) account. Free accounts are not supported for image generation.",
},
},
category: "oauth",
uiAlias: "cx",
thinkingConfig: {"options":["auto","none","low","medium","high"],"defaultMode":"auto"},
thinkingConfig: {
options: [
"auto",
"none",
"low",
"medium",
"high",
],
defaultMode: "auto",
},
transport: {
baseUrl: "https://chatgpt.com/backend-api/codex/responses",
format: "openai-responses",
forceStream: true,
headers: {
"originator": "codex_cli_rs",
"User-Agent": "codex_cli_rs/0.136.0"
originator: "codex_cli_rs",
"User-Agent": "codex_cli_rs/0.136.0",
},
usage: {
url: "https://chatgpt.com/backend-api/wham/usage",
},
usage: { url: "https://chatgpt.com/backend-api/wham/usage" }
},
models: [
{ id: "gpt-5.5", name: "GPT 5.5" },
{ id: "gpt-5.5-review", name: "GPT 5.5 Review", upstreamModelId: "gpt-5.5", quotaFamily: "review" },
{ id: "gpt-5.4", name: "GPT 5.4" },
{ id: "gpt-5.4-review", name: "GPT 5.4 Review", upstreamModelId: "gpt-5.4", quotaFamily: "review" },
{ id: "gpt-5.4-mini", name: "GPT 5.4 Mini" },
{ id: "gpt-5.4-mini-review", name: "GPT 5.4 Mini Review", upstreamModelId: "gpt-5.4-mini", quotaFamily: "review" },
{ id: "gpt-5.3-codex", name: "GPT 5.3 Codex" },
{ id: "gpt-5.3-codex-review", name: "GPT 5.3 Codex Review", upstreamModelId: "gpt-5.3-codex", quotaFamily: "review" },
{ id: "gpt-5.3-codex-xhigh", name: "GPT 5.3 Codex (xHigh)" },
{ id: "gpt-5.3-codex-xhigh-review", name: "GPT 5.3 Codex (xHigh) Review", upstreamModelId: "gpt-5.3-codex-xhigh", quotaFamily: "review" },
{ id: "gpt-5.3-codex-high", name: "GPT 5.3 Codex (High)" },
{ id: "gpt-5.3-codex-high-review", name: "GPT 5.3 Codex (High) Review", upstreamModelId: "gpt-5.3-codex-high", quotaFamily: "review" },
{ id: "gpt-5.3-codex-low", name: "GPT 5.3 Codex (Low)" },
{ id: "gpt-5.3-codex-low-review", name: "GPT 5.3 Codex (Low) Review", upstreamModelId: "gpt-5.3-codex-low", quotaFamily: "review" },
{ id: "gpt-5.3-codex-none", name: "GPT 5.3 Codex (None)" },
{ id: "gpt-5.3-codex-none-review", name: "GPT 5.3 Codex (None) Review", upstreamModelId: "gpt-5.3-codex-none", quotaFamily: "review" },
{ id: "gpt-5.3-codex-spark", name: "GPT 5.3 Codex Spark" },
{ id: "gpt-5.3-codex-spark-review", name: "GPT 5.3 Codex Spark Review", upstreamModelId: "gpt-5.3-codex-spark", quotaFamily: "review" },
{ id: "gpt-5.5-image", name: "GPT 5.5 Image", capabilities: ["text2img","edit"], params: ["size","quality","background","image_detail","output_format"], kind: "image" },
{ id: "gpt-5.4-image", name: "GPT 5.4 Image", capabilities: ["text2img","edit"], params: ["size","quality","background","image_detail","output_format"], kind: "image" },
{ id: "gpt-5.3-image", name: "GPT 5.3 Image", capabilities: ["text2img","edit"], params: ["size","quality","background","image_detail","output_format"], kind: "image" },
],
serviceKinds: ["llm","image"],
oauth: {
clientId: "app_EMoamEEZ73f0CkXaXp7hrann",
authorizeUrl: "https://auth.openai.com/oauth/authorize",
@@ -41,33 +76,17 @@ export default {
extraParams: {
id_token_add_organizations: "true",
codex_cli_simplified_flow: "true",
originator: "codex_cli_rs"
}
,
refreshLeadMs: 432000000
,
refresh: {"encoding":"form","scope":"openid profile email offline_access"}
,
maxRefreshAgeMs: 691200000
,
trackRefreshAt: true
originator: "codex_cli_rs",
},
refreshLeadMs: 432000000,
refresh: {
encoding: "form",
scope: "openid profile email offline_access",
},
maxRefreshAgeMs: 691200000,
trackRefreshAt: true,
},
media: {
serviceKinds: ["llm", "image"]
features: {
usage: true,
},
models: withCodexReviewModels([
{ id: "gpt-5.5", name: "GPT 5.5" },
{ id: "gpt-5.4", name: "GPT 5.4" },
{ id: "gpt-5.4-mini", name: "GPT 5.4 Mini" },
{ id: "gpt-5.3-codex", name: "GPT 5.3 Codex" },
{ id: "gpt-5.3-codex-xhigh", name: "GPT 5.3 Codex (xHigh)" },
{ id: "gpt-5.3-codex-high", name: "GPT 5.3 Codex (High)" },
{ id: "gpt-5.3-codex-low", name: "GPT 5.3 Codex (Low)" },
{ id: "gpt-5.3-codex-none", name: "GPT 5.3 Codex (None)" },
{ id: "gpt-5.3-codex-spark", name: "GPT 5.3 Codex Spark" },
{ id: "gpt-5.5-image", name: "GPT 5.5 Image", type: "image", capabilities: ["text2img", "edit"], params: ["size", "quality", "background", "image_detail", "output_format"] },
{ id: "gpt-5.4-image", name: "GPT 5.4 Image", type: "image", capabilities: ["text2img", "edit"], params: ["size", "quality", "background", "image_detail", "output_format"] },
{ id: "gpt-5.3-image", name: "GPT 5.3 Image", type: "image", capabilities: ["text2img", "edit"], params: ["size", "quality", "background", "image_detail", "output_format"] }
]),
features: {"usage":true},
};