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,75 +1,35 @@
|
||||
|
||||
export default {
|
||||
"id": "groq",
|
||||
"alias": "groq",
|
||||
id: "groq",
|
||||
alias: "groq",
|
||||
display: {
|
||||
"name": "Groq",
|
||||
"icon": "speed",
|
||||
"color": "#F55036",
|
||||
"textIcon": "GQ",
|
||||
"website": "https://groq.com",
|
||||
"notice": {
|
||||
"apiKeyUrl": "https://console.groq.com/keys"
|
||||
}
|
||||
name: "Groq",
|
||||
icon: "speed",
|
||||
color: "#F55036",
|
||||
textIcon: "GQ",
|
||||
website: "https://groq.com",
|
||||
notice: {
|
||||
apiKeyUrl: "https://console.groq.com/keys",
|
||||
},
|
||||
},
|
||||
category: "apikey",
|
||||
"transport": {
|
||||
"baseUrl": "https://api.groq.com/openai/v1/chat/completions",
|
||||
"validateUrl": "https://api.groq.com/openai/v1/models"
|
||||
transport: {
|
||||
baseUrl: "https://api.groq.com/openai/v1/chat/completions",
|
||||
validateUrl: "https://api.groq.com/openai/v1/models",
|
||||
},
|
||||
media: {
|
||||
serviceKinds: ["llm", "imageToText", "stt"],
|
||||
sttConfig: { baseUrl: "https://api.groq.com/openai/v1/audio/transcriptions", authType: "apikey", authHeader: "bearer", format: "openai", models: [{ id: "whisper-large-v3", name: "Whisper Large v3" }, { id: "whisper-large-v3-turbo", name: "Whisper Large v3 Turbo" }, { id: "distil-whisper-large-v3-en", name: "Distil Whisper Large v3 EN" }] }
|
||||
models: [
|
||||
{ id: "llama-3.3-70b-versatile", name: "Llama 3.3 70B" },
|
||||
{ id: "meta-llama/llama-4-maverick-17b-128e-instruct", name: "Llama 4 Maverick" },
|
||||
{ id: "qwen/qwen3-32b", name: "Qwen3 32B" },
|
||||
{ id: "openai/gpt-oss-120b", name: "GPT-OSS 120B" },
|
||||
{ id: "whisper-large-v3", name: "Whisper Large v3", params: ["language","response_format","temperature","prompt"], kind: "stt" },
|
||||
{ id: "whisper-large-v3-turbo", name: "Whisper Large v3 Turbo", params: ["language","response_format","temperature","prompt"], kind: "stt" },
|
||||
{ id: "distil-whisper-large-v3-en", name: "Distil Whisper Large v3 EN", params: ["language","response_format","temperature","prompt"], kind: "stt" },
|
||||
],
|
||||
serviceKinds: ["llm","imageToText","stt"],
|
||||
sttConfig: {
|
||||
baseUrl: "https://api.groq.com/openai/v1/audio/transcriptions",
|
||||
authType: "apikey",
|
||||
authHeader: "bearer",
|
||||
format: "openai",
|
||||
},
|
||||
"models": [
|
||||
{
|
||||
"id": "llama-3.3-70b-versatile",
|
||||
"name": "Llama 3.3 70B"
|
||||
},
|
||||
{
|
||||
"id": "meta-llama/llama-4-maverick-17b-128e-instruct",
|
||||
"name": "Llama 4 Maverick"
|
||||
},
|
||||
{
|
||||
"id": "qwen/qwen3-32b",
|
||||
"name": "Qwen3 32B"
|
||||
},
|
||||
{
|
||||
"id": "openai/gpt-oss-120b",
|
||||
"name": "GPT-OSS 120B"
|
||||
},
|
||||
{
|
||||
"id": "whisper-large-v3",
|
||||
"name": "Whisper Large v3",
|
||||
"type": "stt",
|
||||
"params": [
|
||||
"language",
|
||||
"response_format",
|
||||
"temperature",
|
||||
"prompt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "whisper-large-v3-turbo",
|
||||
"name": "Whisper Large v3 Turbo",
|
||||
"type": "stt",
|
||||
"params": [
|
||||
"language",
|
||||
"response_format",
|
||||
"temperature",
|
||||
"prompt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "distil-whisper-large-v3-en",
|
||||
"name": "Distil Whisper Large v3 EN",
|
||||
"type": "stt",
|
||||
"params": [
|
||||
"language",
|
||||
"response_format",
|
||||
"temperature",
|
||||
"prompt"
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user