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,45 +1,37 @@
|
||||
|
||||
export default {
|
||||
"id": "assemblyai",
|
||||
"alias": "assemblyai",
|
||||
id: "assemblyai",
|
||||
alias: "assemblyai",
|
||||
aliases: [
|
||||
"aai",
|
||||
],
|
||||
uiAlias: "aai",
|
||||
display: {
|
||||
"name": "AssemblyAI",
|
||||
"icon": "record_voice_over",
|
||||
"color": "#0062FF",
|
||||
"textIcon": "AA",
|
||||
"website": "https://assemblyai.com",
|
||||
"notice": {
|
||||
"apiKeyUrl": "https://www.assemblyai.com/app/api-keys"
|
||||
}
|
||||
name: "AssemblyAI",
|
||||
icon: "record_voice_over",
|
||||
color: "#0062FF",
|
||||
textIcon: "AA",
|
||||
website: "https://assemblyai.com",
|
||||
notice: {
|
||||
apiKeyUrl: "https://www.assemblyai.com/app/api-keys",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
uiAlias: "aai",
|
||||
authType: "apikey",
|
||||
aliases: ["aai"],
|
||||
"transport": {
|
||||
"baseUrl": "https://api.assemblyai.com/v1/audio/transcriptions",
|
||||
"validateUrl": "https://api.assemblyai.com/v1/account"
|
||||
transport: {
|
||||
baseUrl: "https://api.assemblyai.com/v1/audio/transcriptions",
|
||||
validateUrl: "https://api.assemblyai.com/v1/account",
|
||||
},
|
||||
media: {
|
||||
serviceKinds: ["stt"],
|
||||
sttConfig: { baseUrl: "https://api.assemblyai.com/v2/transcript", authType: "apikey", authHeader: "authorization", format: "assemblyai", models: [{ id: "best", name: "Best (Nano + Universal)" }, { id: "nano", name: "Nano (Fast)" }] }
|
||||
models: [
|
||||
{ id: "universal-3-pro", name: "Universal 3 Pro", params: ["language"], kind: "stt" },
|
||||
{ id: "universal-2", name: "Universal 2", params: ["language"], kind: "stt" },
|
||||
{ id: "best", name: "Best (Nano + Universal)", kind: "stt" },
|
||||
{ id: "nano", name: "Nano (Fast)", kind: "stt" },
|
||||
],
|
||||
serviceKinds: ["stt"],
|
||||
sttConfig: {
|
||||
baseUrl: "https://api.assemblyai.com/v2/transcript",
|
||||
authType: "apikey",
|
||||
authHeader: "authorization",
|
||||
format: "assemblyai",
|
||||
},
|
||||
"models": [
|
||||
{
|
||||
"id": "universal-3-pro",
|
||||
"name": "Universal 3 Pro",
|
||||
"type": "stt",
|
||||
"params": [
|
||||
"language"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "universal-2",
|
||||
"name": "Universal 2",
|
||||
"type": "stt",
|
||||
"params": [
|
||||
"language"
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user