From dd1e0f9bccc16b9be9f1ab9b9b946b4960b55249 Mon Sep 17 00:00:00 2001 From: decolua Date: Sun, 14 Jun 2026 14:32:59 +0700 Subject: [PATCH] =?UTF-8?q?refactor(registry):=20B2=20migrate=20to=20LiteL?= =?UTF-8?q?LM-style=20schema=20=E2=80=94=20unified=20models[]=20with=20kin?= =?UTF-8?q?d=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- open-sse/config/providerModels.js | 2 +- open-sse/handlers/ttsProviders/index.js | 6 +- open-sse/providers/index.js | 18 +- open-sse/providers/models/helpers.js | 2 +- open-sse/providers/registry/alicode-intl.js | 66 ++--- open-sse/providers/registry/alicode.js | 71 ++--- open-sse/providers/registry/anthropic.js | 29 +- open-sse/providers/registry/antigravity.js | 86 +++--- open-sse/providers/registry/assemblyai.js | 66 ++--- open-sse/providers/registry/azure.js | 28 +- .../providers/registry/black-forest-labs.js | 102 ++----- open-sse/providers/registry/blackbox.js | 120 +++----- open-sse/providers/registry/byteplus.js | 78 ++--- open-sse/providers/registry/cerebras.js | 64 ++--- open-sse/providers/registry/chutes.js | 35 +-- open-sse/providers/registry/claude.js | 87 ++++-- open-sse/providers/registry/cline.js | 100 +++---- open-sse/providers/registry/cloudflare-ai.js | 215 +++----------- open-sse/providers/registry/codebuddy.js | 42 ++- open-sse/providers/registry/codex.js | 107 ++++--- open-sse/providers/registry/cohere.js | 46 ++- open-sse/providers/registry/comfyui.js | 47 +-- open-sse/providers/registry/commandcode.js | 101 +++---- open-sse/providers/registry/cursor.js | 135 +++------ open-sse/providers/registry/deepgram.js | 71 ++--- open-sse/providers/registry/deepseek.js | 73 ++--- open-sse/providers/registry/fal-ai.js | 111 ++----- open-sse/providers/registry/fireworks.js | 56 ++-- open-sse/providers/registry/gemini-cli.js | 72 +++-- open-sse/providers/registry/gemini.js | 206 +++++-------- open-sse/providers/registry/github.js | 218 +++++--------- open-sse/providers/registry/gitlab.js | 41 ++- open-sse/providers/registry/glm-cn.js | 63 ++-- open-sse/providers/registry/glm.js | 38 ++- open-sse/providers/registry/grok-web.js | 95 ++---- open-sse/providers/registry/groq.js | 96 ++----- open-sse/providers/registry/huggingface.js | 73 ++--- open-sse/providers/registry/hyperbolic.js | 77 ++--- open-sse/providers/registry/iflow.js | 125 +++----- open-sse/providers/registry/kilocode.js | 90 +++--- open-sse/providers/registry/kimi-coding.js | 44 ++- open-sse/providers/registry/kimi.js | 41 +-- open-sse/providers/registry/kiro.js | 174 +++++------ .../providers/registry/migrate-registry.mjs | 271 ++++++++++++++++++ open-sse/providers/registry/mimo-free.js | 36 +-- open-sse/providers/registry/minimax-cn.js | 63 ++-- open-sse/providers/registry/minimax.js | 71 +++-- open-sse/providers/registry/mistral.js | 61 ++-- open-sse/providers/registry/mmf.js | 26 +- open-sse/providers/registry/nanobanana.js | 66 ++--- open-sse/providers/registry/nebius.js | 46 ++- open-sse/providers/registry/nvidia.js | 71 ++--- open-sse/providers/registry/ollama-local.js | 25 +- open-sse/providers/registry/ollama.js | 71 ++--- open-sse/providers/registry/openai.js | 271 +++++------------- open-sse/providers/registry/opencode-go.js | 91 ++---- open-sse/providers/registry/opencode.js | 33 +-- open-sse/providers/registry/openrouter.js | 165 ++++------- open-sse/providers/registry/perplexity-web.js | 68 ++--- open-sse/providers/registry/perplexity.js | 55 ++-- open-sse/providers/registry/qoder.js | 125 +++----- open-sse/providers/registry/qwen.js | 56 ++-- open-sse/providers/registry/recraft.js | 55 ++-- open-sse/providers/registry/runwayml.js | 71 ++--- open-sse/providers/registry/sdwebui.js | 47 +-- open-sse/providers/registry/siliconflow.js | 111 ++----- open-sse/providers/registry/stability-ai.js | 85 ++---- open-sse/providers/registry/together.js | 67 ++--- .../providers/registry/vercel-ai-gateway.js | 59 ++-- open-sse/providers/registry/vertex-partner.js | 55 ++-- open-sse/providers/registry/vertex.js | 63 ++-- open-sse/providers/registry/volcengine-ark.js | 82 ++---- open-sse/providers/registry/voyage-ai.js | 77 ++--- open-sse/providers/registry/xai.js | 86 +++--- open-sse/providers/registry/xiaomi-mimo.js | 57 ++-- .../providers/registry/xiaomi-tokenplan.js | 88 ++---- .../media-providers/[kind]/[id]/page.js | 15 +- .../api/providers/[id]/test-models/route.js | 4 +- src/app/api/providers/validate/route.js | 2 +- src/app/api/v1/models/info/route.js | 13 +- src/app/api/v1/models/route.js | 28 +- src/shared/constants/providers.js | 16 +- 82 files changed, 2518 insertions(+), 3651 deletions(-) create mode 100644 open-sse/providers/registry/migrate-registry.mjs diff --git a/open-sse/config/providerModels.js b/open-sse/config/providerModels.js index 2179ea57..c4cfa413 100644 --- a/open-sse/config/providerModels.js +++ b/open-sse/config/providerModels.js @@ -42,7 +42,7 @@ export function getModelType(aliasOrId, modelId) { const models = PROVIDER_MODELS[aliasOrId]; if (!models) return null; const found = models.find(m => m.id === modelId); - return found?.type || null; + return found?.kind || found?.type || null; } export function getModelUpstreamId(aliasOrId, modelId) { diff --git a/open-sse/handlers/ttsProviders/index.js b/open-sse/handlers/ttsProviders/index.js index f80ddf8b..e1bb8b83 100644 --- a/open-sse/handlers/ttsProviders/index.js +++ b/open-sse/handlers/ttsProviders/index.js @@ -33,8 +33,10 @@ export async function synthesizeViaConfig(provider, text, model, credentials) { if (!handler) return null; const apiKey = credentials?.apiKey; if (cfg.authType !== "none" && !apiKey) throw new Error(`${provider} API key required`); - const defaultModel = cfg.models?.[0]?.id || ""; - const { modelId, voiceId } = parseModelVoice(model, defaultModel, "", cfg.models || []); + const { PROVIDER_MODELS } = await import("open-sse/config/providerModels.js"); + const ttsModels = (PROVIDER_MODELS[provider] || []).filter(m => (m.kind || m.type) === "tts"); + const defaultModel = ttsModels[0]?.id || ""; + const { modelId, voiceId } = parseModelVoice(model, defaultModel, "", ttsModels); return handler({ baseUrl: cfg.baseUrl, apiKey, text, modelId, voiceId }); } diff --git a/open-sse/providers/index.js b/open-sse/providers/index.js index 70b62eea..41212d69 100644 --- a/open-sse/providers/index.js +++ b/open-sse/providers/index.js @@ -20,18 +20,28 @@ function buildTransport(transport, oauth) { return t; } +const MEDIA_KEYS = new Set([ + "serviceKinds", "ttsConfig", "sttConfig", "embeddingConfig", + "imageConfig", "imageToTextConfig", "videoConfig", "musicConfig", + "searchViaChat", "searchConfig", "fetchConfig", + "modelsFetcher", "mediaPriority", "hiddenKinds", +]); + export const PROVIDERS = {}; export const PROVIDER_MODELS = {}; export const PROVIDER_OAUTH = {}; export const PROVIDER_MEDIA = {}; for (const entry of REGISTRY) { if (entry.transport) PROVIDERS[entry.id] = buildTransport(entry.transport, entry.oauth); - // models omitted (undefined) → provider has no model list key; [] is a valid explicit empty list - // normalizeModel: accept terse "id" strings + derive name via regex when omitted - // alias defaults to id (doc 01 §2); without fallback all alias-less providers collide on key `undefined` if (entry.models !== undefined) PROVIDER_MODELS[entry.alias || entry.id] = entry.models.map(normalizeModel); if (entry.oauth) PROVIDER_OAUTH[entry.id] = entry.oauth; - if (entry.media) PROVIDER_MEDIA[entry.id] = entry.media; + // Build PROVIDER_MEDIA from top-level fields (post-migration) + legacy entry.media + const mediaFields = {}; + for (const k of MEDIA_KEYS) { + if (entry[k] !== undefined) mediaFields[k] = entry[k]; + } + if (entry.media) Object.assign(mediaFields, entry.media); + if (Object.keys(mediaFields).length) PROVIDER_MEDIA[entry.id] = mediaFields; } // TTS model/voice tables keyed by special names (openai-tts-models, ...), not provider ids diff --git a/open-sse/providers/models/helpers.js b/open-sse/providers/models/helpers.js index 5db7be04..a7d273d6 100644 --- a/open-sse/providers/models/helpers.js +++ b/open-sse/providers/models/helpers.js @@ -3,7 +3,7 @@ export const CODEX_REVIEW_SUFFIX = "-review"; export function withCodexReviewModels(models) { return models.flatMap((model) => { - if ((model.type || "llm") !== "llm" || model.id.endsWith(CODEX_REVIEW_SUFFIX)) { + if ((model.kind || model.type || "llm") !== "llm" || model.id.endsWith(CODEX_REVIEW_SUFFIX)) { return [model]; } return [ diff --git a/open-sse/providers/registry/alicode-intl.js b/open-sse/providers/registry/alicode-intl.js index 6c8210f1..b0017480 100644 --- a/open-sse/providers/registry/alicode-intl.js +++ b/open-sse/providers/registry/alicode-intl.js @@ -1,50 +1,28 @@ - export default { - "id": "alicode-intl", - "alias": "alicode-intl", + id: "alicode-intl", + alias: "alicode-intl", display: { - "name": "Alibaba Intl", - "icon": "cloud", - "color": "#FF6A00", - "textIcon": "ALi", - "website": "https://modelstudio.console.alibabacloud.com", - "notice": { - "apiKeyUrl": "https://modelstudio.console.alibabacloud.com/?apiKey=1" - } + name: "Alibaba Intl", + icon: "cloud", + color: "#FF6A00", + textIcon: "ALi", + website: "https://modelstudio.console.alibabacloud.com", + notice: { + apiKeyUrl: "https://modelstudio.console.alibabacloud.com/?apiKey=1", + }, }, category: "apikey", - "transport": { - "baseUrl": "https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions", - "headers": {} + transport: { + baseUrl: "https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions", + headers: {}, }, - "models": [ - { - "id": "qwen3.5-plus", - "name": "Qwen3.5 Plus" - }, - { - "id": "kimi-k2.5", - "name": "Kimi K2.5" - }, - { - "id": "glm-5", - "name": "GLM 5" - }, - { - "id": "MiniMax-M2.5", - "name": "MiniMax M2.5" - }, - { - "id": "qwen3-coder-next", - "name": "Qwen3 Coder Next" - }, - { - "id": "qwen3-coder-plus", - "name": "Qwen3 Coder Plus" - }, - { - "id": "glm-4.7", - "name": "GLM 4.7" - } - ] + models: [ + { id: "qwen3.5-plus", name: "Qwen3.5 Plus" }, + { id: "kimi-k2.5", name: "Kimi K2.5" }, + { id: "glm-5", name: "GLM 5" }, + { id: "MiniMax-M2.5", name: "MiniMax M2.5" }, + { id: "qwen3-coder-next", name: "Qwen3 Coder Next" }, + { id: "qwen3-coder-plus", name: "Qwen3 Coder Plus" }, + { id: "glm-4.7", name: "GLM 4.7" }, + ], }; diff --git a/open-sse/providers/registry/alicode.js b/open-sse/providers/registry/alicode.js index 2ca4bb8e..1e873326 100644 --- a/open-sse/providers/registry/alicode.js +++ b/open-sse/providers/registry/alicode.js @@ -1,54 +1,29 @@ - export default { - "id": "alicode", - "alias": "alicode", + id: "alicode", + alias: "alicode", display: { - "name": "Alibaba", - "icon": "cloud", - "color": "#FF6A00", - "textIcon": "ALi", - "website": "https://bailian.console.aliyun.com", - "notice": { - "apiKeyUrl": "https://bailian.console.aliyun.com/?apiKey=1" - } + name: "Alibaba", + icon: "cloud", + color: "#FF6A00", + textIcon: "ALi", + website: "https://bailian.console.aliyun.com", + notice: { + apiKeyUrl: "https://bailian.console.aliyun.com/?apiKey=1", + }, }, category: "apikey", - "transport": { - "baseUrl": "https://coding.dashscope.aliyuncs.com/v1/chat/completions", - "headers": {} + transport: { + baseUrl: "https://coding.dashscope.aliyuncs.com/v1/chat/completions", + headers: {}, }, - "models": [ - { - "id": "qwen3.5-plus", - "name": "Qwen3.5 Plus" - }, - { - "id": "kimi-k2.5", - "name": "Kimi K2.5" - }, - { - "id": "glm-5", - "name": "GLM 5" - }, - { - "id": "MiniMax-M2.5", - "name": "MiniMax M2.5" - }, - { - "id": "qwen3-max-2026-01-23", - "name": "Qwen3 Max" - }, - { - "id": "qwen3-coder-next", - "name": "Qwen3 Coder Next" - }, - { - "id": "qwen3-coder-plus", - "name": "Qwen3 Coder Plus" - }, - { - "id": "glm-4.7", - "name": "GLM 4.7" - } - ] + models: [ + { id: "qwen3.5-plus", name: "Qwen3.5 Plus" }, + { id: "kimi-k2.5", name: "Kimi K2.5" }, + { id: "glm-5", name: "GLM 5" }, + { id: "MiniMax-M2.5", name: "MiniMax M2.5" }, + { id: "qwen3-max-2026-01-23", name: "Qwen3 Max" }, + { id: "qwen3-coder-next", name: "Qwen3 Coder Next" }, + { id: "qwen3-coder-plus", name: "Qwen3 Coder Plus" }, + { id: "glm-4.7", name: "GLM 4.7" }, + ], }; diff --git a/open-sse/providers/registry/anthropic.js b/open-sse/providers/registry/anthropic.js index cd736bbc..3bcc2c30 100644 --- a/open-sse/providers/registry/anthropic.js +++ b/open-sse/providers/registry/anthropic.js @@ -4,27 +4,28 @@ export default { id: "anthropic", alias: "anthropic", display: { - "name": "Anthropic", - "icon": "smart_toy", - "color": "#D97757", - "textIcon": "AN", - "website": "https://console.anthropic.com", - "notice": { - "apiKeyUrl": "https://console.anthropic.com/settings/keys" - } + name: "Anthropic", + icon: "smart_toy", + color: "#D97757", + textIcon: "AN", + website: "https://console.anthropic.com", + notice: { + apiKeyUrl: "https://console.anthropic.com/settings/keys", + }, }, category: "apikey", transport: { baseUrl: "https://api.anthropic.com/v1/messages", format: "claude", - headers: { ...CLAUDE_API_HEADERS } - }, - media: { - serviceKinds: ["llm", "imageToText"] + headers: { + "Anthropic-Version": "2023-06-01", + "Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14", + }, }, models: [ { id: "claude-sonnet-4-20250514", name: "Claude Sonnet 4" }, { id: "claude-opus-4-20250514", name: "Claude Opus 4" }, - { id: "claude-3-5-sonnet-20241022", name: "Claude 3.5 Sonnet" } - ] + { id: "claude-3-5-sonnet-20241022", name: "Claude 3.5 Sonnet" }, + ], + serviceKinds: ["llm","imageToText"], }; diff --git a/open-sse/providers/registry/antigravity.js b/open-sse/providers/registry/antigravity.js index d786d603..1be0f035 100644 --- a/open-sse/providers/registry/antigravity.js +++ b/open-sse/providers/registry/antigravity.js @@ -4,54 +4,43 @@ import { ANTIGRAVITY_OAUTH_CLIENT } from "../shared.js"; export default { id: "antigravity", alias: "ag", + uiAlias: "ag", display: { - "name": "Antigravity", - "icon": "rocket_launch", - "color": "#F59E0B", - "website": "https://antigravity.google", - "notice": { - "signupUrl": "https://antigravity.google" - }, - "deprecated": true, - "deprecationNotice": "RISK_NOTICE" + name: "Antigravity", + icon: "rocket_launch", + color: "#F59E0B", + website: "https://antigravity.google", + notice: { + signupUrl: "https://antigravity.google", + }, + deprecated: true, + deprecationNotice: "RISK_NOTICE", }, category: "oauth", - uiAlias: "ag", transport: { baseUrls: [ "https://daily-cloudcode-pa.googleapis.com", - "https://daily-cloudcode-pa.sandbox.googleapis.com" + "https://daily-cloudcode-pa.sandbox.googleapis.com", ], format: "antigravity", - headers: { "User-Agent": `antigravity/1.107.0 ${platform()}/${arch()}` }, - // 429/503 use computeRetryDelay hook (Retry-After header/body → cap, else backoff) - retry: { 429: { attempts: 6 }, 503: { attempts: 3 } }, + headers: { + "User-Agent": "antigravity/1.107.0 darwin/arm64", + }, + retry: { + "429": { + attempts: 6, + }, + "503": { + attempts: 3, + }, + }, usage: { quotaApiUrl: "https://cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels", loadProjectApiUrl: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist", - tokenUrl: "https://oauth2.googleapis.com/token" + tokenUrl: "https://oauth2.googleapis.com/token", }, - ...ANTIGRAVITY_OAUTH_CLIENT - }, - oauth: { - authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth", - tokenUrl: "https://oauth2.googleapis.com/token", - userInfoUrl: "https://www.googleapis.com/oauth2/v1/userinfo", - scopes: [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/userinfo.email", - "https://www.googleapis.com/auth/userinfo.profile", - "https://www.googleapis.com/auth/cclog", - "https://www.googleapis.com/auth/experimentsandconfigs" - ], - apiEndpoint: "https://cloudcode-pa.googleapis.com", - apiVersion: "v1internal", - loadCodeAssistEndpoint: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist", - onboardUserEndpoint: "https://cloudcode-pa.googleapis.com/v1internal:onboardUser", - loadCodeAssistUserAgent: "google-api-nodejs-client/9.15.1", - loadCodeAssistApiClient: "google-cloud-sdk vscode_cloudshelleditor/0.1" - , - refreshLeadMs: 300000 + clientId: "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com", + clientSecret: "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", }, models: [ { id: "gemini-3-flash-agent", name: "Gemini 3.5 Flash (High)" }, @@ -62,7 +51,28 @@ export default { { id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6 (Thinking)" }, { id: "claude-opus-4-6-thinking", name: "Claude Opus 4.6 (Thinking)" }, { id: "gpt-oss-120b-medium", name: "GPT-OSS 120B (Medium)" }, - { id: "gemini-3-flash", name: "Gemini 3 Flash", thinking: false } + { id: "gemini-3-flash", name: "Gemini 3 Flash", thinking: false }, ], - features: {"usage":true}, + oauth: { + authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth", + tokenUrl: "https://oauth2.googleapis.com/token", + userInfoUrl: "https://www.googleapis.com/oauth2/v1/userinfo", + scopes: [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/userinfo.email", + "https://www.googleapis.com/auth/userinfo.profile", + "https://www.googleapis.com/auth/cclog", + "https://www.googleapis.com/auth/experimentsandconfigs", + ], + apiEndpoint: "https://cloudcode-pa.googleapis.com", + apiVersion: "v1internal", + loadCodeAssistEndpoint: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist", + onboardUserEndpoint: "https://cloudcode-pa.googleapis.com/v1internal:onboardUser", + loadCodeAssistUserAgent: "google-api-nodejs-client/9.15.1", + loadCodeAssistApiClient: "google-cloud-sdk vscode_cloudshelleditor/0.1", + refreshLeadMs: 300000, + }, + features: { + usage: true, + }, }; diff --git a/open-sse/providers/registry/assemblyai.js b/open-sse/providers/registry/assemblyai.js index 234b8611..a14f0a4d 100644 --- a/open-sse/providers/registry/assemblyai.js +++ b/open-sse/providers/registry/assemblyai.js @@ -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" - ] - } - ] }; diff --git a/open-sse/providers/registry/azure.js b/open-sse/providers/registry/azure.js index 536dd0e8..5a9b9401 100644 --- a/open-sse/providers/registry/azure.js +++ b/open-sse/providers/registry/azure.js @@ -1,20 +1,20 @@ export default { - "id": "azure", - "alias": "azure", + id: "azure", + alias: "azure", display: { - "name": "Azure OpenAI", - "icon": "cloud", - "color": "#0078D4", - "textIcon": "AZ", - "website": "https://azure.microsoft.com/en-us/products/ai-services/openai-service", - "notice": { - "apiKeyUrl": "https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI" - } + name: "Azure OpenAI", + icon: "cloud", + color: "#0078D4", + textIcon: "AZ", + website: "https://azure.microsoft.com/en-us/products/ai-services/openai-service", + notice: { + apiKeyUrl: "https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI", + }, }, category: "apikey", hasProviderSpecificData: true, - "transport": { - "baseUrl": "", - "headers": {} - } + transport: { + baseUrl: "", + headers: {}, + }, }; diff --git a/open-sse/providers/registry/black-forest-labs.js b/open-sse/providers/registry/black-forest-labs.js index f29bb298..ccbefcd0 100644 --- a/open-sse/providers/registry/black-forest-labs.js +++ b/open-sse/providers/registry/black-forest-labs.js @@ -1,83 +1,31 @@ - export default { - "id": "black-forest-labs", - "alias": "black-forest-labs", + id: "black-forest-labs", + alias: "black-forest-labs", + aliases: [ + "bfl", + ], + uiAlias: "bfl", display: { - "name": "Black Forest Labs", - "icon": "image", - "color": "#111827", - "textIcon": "BF", - "website": "https://blackforestlabs.ai", - "notice": { - "apiKeyUrl": "https://api.bfl.ai" - } + name: "Black Forest Labs", + icon: "image", + color: "#111827", + textIcon: "BF", + website: "https://blackforestlabs.ai", + notice: { + apiKeyUrl: "https://api.bfl.ai", + }, }, category: "apikey", - uiAlias: "bfl", authType: "apikey", - aliases: ["bfl"], - "transport": null, - media: { - serviceKinds: ["image"], - imageConfig: { baseUrl: "https://api.bfl.ai/v1" } - }, - "models": [ - { - "id": "flux-pro-1.1", - "name": "FLUX Pro 1.1", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "flux-pro-1.1-ultra", - "name": "FLUX Pro 1.1 Ultra", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "flux-pro", - "name": "FLUX Pro", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "flux-dev", - "name": "FLUX Dev", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "flux-kontext-pro", - "name": "FLUX Kontext Pro (Edit)", - "type": "image", - "params": [ - "size" - ], - "capabilities": [ - "edit" - ] - }, - { - "id": "flux-kontext-max", - "name": "FLUX Kontext Max (Edit)", - "type": "image", - "params": [ - "size" - ], - "capabilities": [ - "edit" - ] - } - ] + transport: null, + models: [ + { id: "flux-pro-1.1", name: "FLUX Pro 1.1", params: ["n","size"], kind: "image" }, + { id: "flux-pro-1.1-ultra", name: "FLUX Pro 1.1 Ultra", params: ["size"], kind: "image" }, + { id: "flux-pro", name: "FLUX Pro", params: ["n","size"], kind: "image" }, + { id: "flux-dev", name: "FLUX Dev", params: ["n","size"], kind: "image" }, + { id: "flux-kontext-pro", name: "FLUX Kontext Pro (Edit)", params: ["size"], capabilities: ["edit"], kind: "image" }, + { id: "flux-kontext-max", name: "FLUX Kontext Max (Edit)", params: ["size"], capabilities: ["edit"], kind: "image" }, + ], + serviceKinds: ["image"], + imageConfig: { baseUrl: "https://api.bfl.ai/v1" }, }; diff --git a/open-sse/providers/registry/blackbox.js b/open-sse/providers/registry/blackbox.js index 18fa2732..19397434 100644 --- a/open-sse/providers/registry/blackbox.js +++ b/open-sse/providers/registry/blackbox.js @@ -1,91 +1,41 @@ - export default { - "id": "blackbox", - "alias": "blackbox", + id: "blackbox", + alias: "blackbox", + aliases: [ + "bb", + ], + uiAlias: "bb", display: { - "name": "Blackbox AI", - "icon": "smart_toy", - "color": "#5B5FEF", - "textIcon": "BB", - "website": "https://blackbox.ai", - "notice": { - "apiKeyUrl": "https://www.blackbox.ai/api-management" - } + name: "Blackbox AI", + icon: "smart_toy", + color: "#5B5FEF", + textIcon: "BB", + website: "https://blackbox.ai", + notice: { + apiKeyUrl: "https://www.blackbox.ai/api-management", + }, }, category: "apikey", - uiAlias: "bb", - aliases: ["bb"], - "transport": { - "baseUrl": "https://api.blackbox.ai/chat/completions" + transport: { + baseUrl: "https://api.blackbox.ai/chat/completions", }, - "models": [ - { - "id": "gpt-4o", - "name": "GPT-4o" - }, - { - "id": "gpt-4o-mini", - "name": "GPT-4o mini" - }, - { - "id": "claude-sonnet-4.6", - "name": "Claude Sonnet 4.6" - }, - { - "id": "claude-sonnet-4.5", - "name": "Claude Sonnet 4.5" - }, - { - "id": "claude-opus-4.6", - "name": "Claude Opus 4.6" - }, - { - "id": "claude-sonnet-4-6", - "name": "Claude Sonnet 4.6 (Legacy)" - }, - { - "id": "claude-opus-4-6", - "name": "Claude Opus 4.6 (Legacy)" - }, - { - "id": "deepseek-chat", - "name": "DeepSeek Chat" - }, - { - "id": "deepseek-v3-671b", - "name": "DeepSeek V3 671B" - }, - { - "id": "deepseek-r1", - "name": "DeepSeek R1" - }, - { - "id": "o1", - "name": "OpenAI o1" - }, - { - "id": "o3-mini", - "name": "OpenAI o3-mini" - }, - { - "id": "gemini-2.5-flash", - "name": "Gemini 2.5 Flash" - }, - { - "id": "gemini-3-flash-preview", - "name": "Gemini 3 Flash Preview" - }, - { - "id": "qwen3-coder-plus", - "name": "Qwen3 Coder Plus" - }, - { - "id": "qwen3-max", - "name": "Qwen3 Max" - }, - { - "id": "qwen3-vl-plus", - "name": "Qwen3 VL Plus" - } - ] + models: [ + { id: "gpt-4o", name: "GPT-4o" }, + { id: "gpt-4o-mini", name: "GPT-4o mini" }, + { id: "claude-sonnet-4.6", name: "Claude Sonnet 4.6" }, + { id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" }, + { id: "claude-opus-4.6", name: "Claude Opus 4.6" }, + { id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6 (Legacy)" }, + { id: "claude-opus-4-6", name: "Claude Opus 4.6 (Legacy)" }, + { id: "deepseek-chat", name: "DeepSeek Chat" }, + { id: "deepseek-v3-671b", name: "DeepSeek V3 671B" }, + { id: "deepseek-r1", name: "DeepSeek R1" }, + { id: "o1", name: "OpenAI o1" }, + { id: "o3-mini", name: "OpenAI o3-mini" }, + { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash" }, + { id: "gemini-3-flash-preview", name: "Gemini 3 Flash Preview" }, + { id: "qwen3-coder-plus", name: "Qwen3 Coder Plus" }, + { id: "qwen3-max", name: "Qwen3 Max" }, + { id: "qwen3-vl-plus", name: "Qwen3 VL Plus" }, + ], }; diff --git a/open-sse/providers/registry/byteplus.js b/open-sse/providers/registry/byteplus.js index 5d5ce1ec..4c75803e 100644 --- a/open-sse/providers/registry/byteplus.js +++ b/open-sse/providers/registry/byteplus.js @@ -1,56 +1,34 @@ - export default { - "id": "byteplus", - "alias": "byteplus", + id: "byteplus", + alias: "byteplus", + aliases: [ + "bpm", + ], + uiAlias: "bpm", display: { - "name": "BytePlus ModelArk", - "icon": "cloud", - "color": "#2563EB", - "textIcon": "BP", - "website": "https://console.byteplus.com/ark", - "notice": { - "text": "Free credits for new accounts. Access to Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B models.", - "apiKeyUrl": "https://console.byteplus.com/ark/region:ark+ap-southeast-1/apiKey" - } + name: "BytePlus ModelArk", + icon: "cloud", + color: "#2563EB", + textIcon: "BP", + website: "https://console.byteplus.com/ark", + notice: { + text: "Free credits for new accounts. Access to Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B models.", + apiKeyUrl: "https://console.byteplus.com/ark/region:ark+ap-southeast-1/apiKey", + }, }, category: "freeTier", - uiAlias: "bpm", - aliases: ["bpm"], - "transport": { - "baseUrl": "https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions", - "headers": {} + transport: { + baseUrl: "https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions", + headers: {}, }, - media: { - serviceKinds: ["llm"] - }, - "models": [ - { - "id": "seed-2-0-pro-260328", - "name": "Seed 2.0 Pro" - }, - { - "id": "seed-2-0-code-preview-260328", - "name": "Seed 2.0 Code Preview" - }, - { - "id": "seed-2-0-mini-260215", - "name": "Seed 2.0 Mini" - }, - { - "id": "seed-2-0-lite-260228", - "name": "Seed 2.0 Lite" - }, - { - "id": "kimi-k2-thinking-251104", - "name": "Kimi K2 Thinking" - }, - { - "id": "glm-4-7-251222", - "name": "GLM 4.7" - }, - { - "id": "gpt-oss-120b-250805", - "name": "GPT-OSS-120B" - } - ] + models: [ + { id: "seed-2-0-pro-260328", name: "Seed 2.0 Pro" }, + { id: "seed-2-0-code-preview-260328", name: "Seed 2.0 Code Preview" }, + { id: "seed-2-0-mini-260215", name: "Seed 2.0 Mini" }, + { id: "seed-2-0-lite-260228", name: "Seed 2.0 Lite" }, + { id: "kimi-k2-thinking-251104", name: "Kimi K2 Thinking" }, + { id: "glm-4-7-251222", name: "GLM 4.7" }, + { id: "gpt-oss-120b-250805", name: "GPT-OSS-120B" }, + ], + serviceKinds: ["llm"], }; diff --git a/open-sse/providers/registry/cerebras.js b/open-sse/providers/registry/cerebras.js index 5177c0d8..fc4029df 100644 --- a/open-sse/providers/registry/cerebras.js +++ b/open-sse/providers/registry/cerebras.js @@ -1,46 +1,30 @@ export default { - "id": "cerebras", - "alias": "cerebras", + id: "cerebras", + alias: "cerebras", display: { - "name": "Cerebras", - "icon": "memory", - "color": "#FF4F00", - "textIcon": "CB", - "website": "https://www.cerebras.ai", - "notice": { - "apiKeyUrl": "https://cloud.cerebras.ai/platform" - } + name: "Cerebras", + icon: "memory", + color: "#FF4F00", + textIcon: "CB", + website: "https://www.cerebras.ai", + notice: { + apiKeyUrl: "https://cloud.cerebras.ai/platform", + }, }, category: "apikey", - "transport": { - "baseUrl": "https://api.cerebras.ai/v1/chat/completions", - "validateUrl": "https://api.cerebras.ai/v1/models", - "quirks": { "dropClientMetadata": true } + transport: { + baseUrl: "https://api.cerebras.ai/v1/chat/completions", + validateUrl: "https://api.cerebras.ai/v1/models", + quirks: { + dropClientMetadata: true, + }, }, - "models": [ - { - "id": "gpt-oss-120b", - "name": "GPT OSS 120B" - }, - { - "id": "zai-glm-4.7", - "name": "ZAI GLM 4.7" - }, - { - "id": "llama-3.3-70b", - "name": "Llama 3.3 70B" - }, - { - "id": "llama-4-scout-17b-16e-instruct", - "name": "Llama 4 Scout" - }, - { - "id": "qwen-3-235b-a22b-instruct-2507", - "name": "Qwen3 235B A22B" - }, - { - "id": "qwen-3-32b", - "name": "Qwen3 32B" - } - ] + models: [ + { id: "gpt-oss-120b", name: "GPT OSS 120B" }, + { id: "zai-glm-4.7", name: "ZAI GLM 4.7" }, + { id: "llama-3.3-70b", name: "Llama 3.3 70B" }, + { id: "llama-4-scout-17b-16e-instruct", name: "Llama 4 Scout" }, + { id: "qwen-3-235b-a22b-instruct-2507", name: "Qwen3 235B A22B" }, + { id: "qwen-3-32b", name: "Qwen3 32B" }, + ], }; diff --git a/open-sse/providers/registry/chutes.js b/open-sse/providers/registry/chutes.js index 82f27504..b761b8db 100644 --- a/open-sse/providers/registry/chutes.js +++ b/open-sse/providers/registry/chutes.js @@ -1,22 +1,23 @@ - export default { - "id": "chutes", - "alias": "chutes", + id: "chutes", + alias: "chutes", + aliases: [ + "ch", + ], + uiAlias: "ch", display: { - "name": "Chutes AI", - "icon": "water_drop", - "color": "#ffffffff", - "textIcon": "CH", - "website": "https://chutes.ai", - "notice": { - "apiKeyUrl": "https://chutes.ai/app/api" - } + name: "Chutes AI", + icon: "water_drop", + color: "#ffffffff", + textIcon: "CH", + website: "https://chutes.ai", + notice: { + apiKeyUrl: "https://chutes.ai/app/api", + }, }, category: "apikey", - uiAlias: "ch", - aliases: ["ch"], - "transport": { - "baseUrl": "https://llm.chutes.ai/v1/chat/completions", - "validateUrl": "https://llm.chutes.ai/v1/models" - } + transport: { + baseUrl: "https://llm.chutes.ai/v1/chat/completions", + validateUrl: "https://llm.chutes.ai/v1/models", + }, }; diff --git a/open-sse/providers/registry/claude.js b/open-sse/providers/registry/claude.js index 3fbd198a..61c9dc58 100644 --- a/open-sse/providers/registry/claude.js +++ b/open-sse/providers/registry/claude.js @@ -3,41 +3,61 @@ import { CLAUDE_CLI_SPOOF_HEADERS } from "../shared.js"; export default { id: "claude", alias: "cc", + uiAlias: "cc", display: { - "name": "Claude Code", - "icon": "smart_toy", - "color": "#D97757", - "website": "https://claude.ai", - "notice": { - "signupUrl": "https://claude.ai" - }, - "deprecated": true, - "deprecationNotice": "RISK_NOTICE" + name: "Claude Code", + icon: "smart_toy", + color: "#D97757", + website: "https://claude.ai", + notice: { + signupUrl: "https://claude.ai", + }, + deprecated: true, + deprecationNotice: "RISK_NOTICE", }, category: "oauth", - uiAlias: "cc", transport: { baseUrl: "https://api.anthropic.com/v1/messages", format: "claude", urlSuffix: "?beta=true", - headers: { ...CLAUDE_CLI_SPOOF_HEADERS }, - quirks: { cloakToolsOnOAuth: true }, - auth: {"apiKey":{"header":"x-api-key","scheme":"raw"},"oauth":{"header":"Authorization","scheme":"bearer"},"hooks":["claudeOverlay"]}, + headers: { + "Anthropic-Version": "2023-06-01", + "Anthropic-Beta": "claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05,advanced-tool-use-2025-11-20,effort-2025-11-24,structured-outputs-2025-12-15,fast-mode-2026-02-01,redact-thinking-2026-02-12,token-efficient-tools-2026-03-28", + "Anthropic-Dangerous-Direct-Browser-Access": "true", + "User-Agent": "claude-cli/2.1.92 (external, sdk-cli)", + "X-App": "cli", + "X-Stainless-Helper-Method": "stream", + "X-Stainless-Retry-Count": "0", + "X-Stainless-Runtime-Version": "v24.14.0", + "X-Stainless-Package-Version": "0.80.0", + "X-Stainless-Runtime": "node", + "X-Stainless-Lang": "js", + "X-Stainless-Arch": "arm64", + "X-Stainless-Os": "MacOS", + "X-Stainless-Timeout": "600", + }, + quirks: { + cloakToolsOnOAuth: true, + }, + auth: { + apiKey: { + header: "x-api-key", + scheme: "raw", + }, + oauth: { + header: "Authorization", + scheme: "bearer", + }, + hooks: [ + "claudeOverlay", + ], + }, usage: { oauthUrl: "https://api.anthropic.com/api/oauth/usage", orgUrl: "https://api.anthropic.com/v1/organizations/{org_id}/usage", - settingsUrl: "https://api.anthropic.com/v1/settings" + settingsUrl: "https://api.anthropic.com/v1/settings", }, }, - oauth: { - clientId: "9d1c250a-e61b-44d9-88ed-5944d1962f5e", - authorizeUrl: "https://claude.ai/oauth/authorize", - tokenUrl: "https://api.anthropic.com/v1/oauth/token", - scopes: ["org:create_api_key", "user:profile", "user:inference"], - codeChallengeMethod: "S256", - refreshLeadMs: 14400000, - refresh: {"encoding":"json"} - }, models: [ { id: "claude-opus-4-8", name: "Claude Opus 4.8" }, { id: "claude-opus-4-7", name: "Claude Opus 4.7" }, @@ -45,7 +65,24 @@ export default { { id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" }, { id: "claude-opus-4-5-20251101", name: "Claude 4.5 Opus" }, { id: "claude-sonnet-4-5-20250929", name: "Claude 4.5 Sonnet" }, - { id: "claude-haiku-4-5-20251001", name: "Claude 4.5 Haiku" } + { id: "claude-haiku-4-5-20251001", name: "Claude 4.5 Haiku" }, ], - features: {"usage":true}, + oauth: { + clientId: "9d1c250a-e61b-44d9-88ed-5944d1962f5e", + authorizeUrl: "https://claude.ai/oauth/authorize", + tokenUrl: "https://api.anthropic.com/v1/oauth/token", + scopes: [ + "org:create_api_key", + "user:profile", + "user:inference", + ], + codeChallengeMethod: "S256", + refreshLeadMs: 14400000, + refresh: { + encoding: "json", + }, + }, + features: { + usage: true, + }, }; diff --git a/open-sse/providers/registry/cline.js b/open-sse/providers/registry/cline.js index e82e5248..2470dc0a 100644 --- a/open-sse/providers/registry/cline.js +++ b/open-sse/providers/registry/cline.js @@ -1,68 +1,50 @@ - export default { - "id": "cline", - "alias": "cl", + id: "cline", + alias: "cl", + uiAlias: "cl", display: { - "name": "Cline", - "icon": "smart_toy", - "color": "#5B9BD5", - "textIcon": "CL", - "website": "https://cline.bot", - "notice": { - "signupUrl": "https://cline.bot" - } + name: "Cline", + icon: "smart_toy", + color: "#5B9BD5", + textIcon: "CL", + website: "https://cline.bot", + notice: { + signupUrl: "https://cline.bot", + }, }, category: "oauth", - uiAlias: "cl", - "transport": { - "baseUrl": "https://api.cline.bot/api/v1/chat/completions", - "headers": { + transport: { + baseUrl: "https://api.cline.bot/api/v1/chat/completions", + headers: { "HTTP-Referer": "https://cline.bot", - "X-Title": "Cline" + "X-Title": "Cline", + }, + tokenUrl: "https://api.cline.bot/api/v1/auth/token", + refreshUrl: "https://api.cline.bot/api/v1/auth/refresh", + auth: { + combined: true, + header: "Authorization", + scheme: "bearer", + hooks: [ + "clineHeaders", + ], }, - "tokenUrl": "https://api.cline.bot/api/v1/auth/token", - "refreshUrl": "https://api.cline.bot/api/v1/auth/refresh", - auth: {"combined":true,"header":"Authorization","scheme":"bearer","hooks":["clineHeaders"]}, }, - "oauth": { - "appBaseUrl": "https://app.cline.bot", - "apiBaseUrl": "https://api.cline.bot", - "authorizeUrl": "https://api.cline.bot/api/v1/auth/authorize", - "tokenExchangeUrl": "https://api.cline.bot/api/v1/auth/token", - "refreshUrl": "https://api.cline.bot/api/v1/auth/refresh" - }, - "models": [ - { - "id": "anthropic/claude-opus-4.7", - "name": "Claude Opus 4.7" - }, - { - "id": "anthropic/claude-sonnet-4.6", - "name": "Claude Sonnet 4.6" - }, - { - "id": "anthropic/claude-opus-4.6", - "name": "Claude Opus 4.6" - }, - { - "id": "openai/gpt-5.3-codex", - "name": "GPT-5.3 Codex" - }, - { - "id": "openai/gpt-5.4", - "name": "GPT-5.4" - }, - { - "id": "google/gemini-3.1-pro-preview", - "name": "Gemini 3.1 Pro Preview" - }, - { - "id": "google/gemini-3.1-flash-lite-preview", - "name": "Gemini 3.1 Flash Lite Preview" - }, - { - "id": "kwaipilot/kat-coder-pro", - "name": "KAT Coder Pro" - } + models: [ + { id: "anthropic/claude-opus-4.7", name: "Claude Opus 4.7" }, + { id: "anthropic/claude-sonnet-4.6", name: "Claude Sonnet 4.6" }, + { id: "anthropic/claude-opus-4.6", name: "Claude Opus 4.6" }, + { id: "openai/gpt-5.3-codex", name: "GPT-5.3 Codex" }, + { id: "openai/gpt-5.4", name: "GPT-5.4" }, + { id: "google/gemini-3.1-pro-preview", name: "Gemini 3.1 Pro Preview" }, + { id: "google/gemini-3.1-flash-lite-preview", name: "Gemini 3.1 Flash Lite Preview" }, + { id: "kwaipilot/kat-coder-pro", name: "KAT Coder Pro" }, ], + oauth: { + appBaseUrl: "https://app.cline.bot", + apiBaseUrl: "https://api.cline.bot", + authorizeUrl: "https://api.cline.bot/api/v1/auth/authorize", + tokenExchangeUrl: "https://api.cline.bot/api/v1/auth/token", + refreshUrl: "https://api.cline.bot/api/v1/auth/refresh", + }, }; diff --git a/open-sse/providers/registry/cloudflare-ai.js b/open-sse/providers/registry/cloudflare-ai.js index 845e6fb7..0018c2a4 100644 --- a/open-sse/providers/registry/cloudflare-ai.js +++ b/open-sse/providers/registry/cloudflare-ai.js @@ -1,177 +1,52 @@ - export default { - "id": "cloudflare-ai", - "alias": "cloudflare-ai", + id: "cloudflare-ai", + alias: "cloudflare-ai", + aliases: [ + "cf", + ], + uiAlias: "cf", display: { - "name": "Cloudflare", - "icon": "cloud", - "color": "#F38020", - "textIcon": "CF", - "website": "https://developers.cloudflare.com/workers-ai/", - "notice": { - "text": "Workers AI free tier. Requires a Cloudflare API token and Account ID.", - "apiKeyUrl": "https://dash.cloudflare.com/profile/api-tokens" - } + name: "Cloudflare", + icon: "cloud", + color: "#F38020", + textIcon: "CF", + website: "https://developers.cloudflare.com/workers-ai/", + notice: { + text: "Workers AI free tier. Requires a Cloudflare API token and Account ID.", + apiKeyUrl: "https://dash.cloudflare.com/profile/api-tokens", + }, }, category: "freeTier", - uiAlias: "cf", hasProviderSpecificData: true, - aliases: ["cf"], - "transport": { - "baseUrl": "https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1/chat/completions" + transport: { + baseUrl: "https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1/chat/completions", }, - media: { - serviceKinds: ["llm", "image"], - hasProviderSpecificData: true, - imageConfig: { baseUrl: "https://api.cloudflare.com/client/v4/accounts" } - }, - "models": [ - { - "id": "@cf/meta/llama-3.2-1b-instruct", - "name": "Llama 3.2 1B Instruct" - }, - { - "id": "@cf/meta/llama-3.2-3b-instruct", - "name": "Llama 3.2 3B Instruct" - }, - { - "id": "@cf/meta/llama-3.1-8b-instruct-fp8-fast", - "name": "Llama 3.1 8B Instruct FP8 Fast" - }, - { - "id": "@cf/meta/llama-3.1-8b-instruct-awq", - "name": "Llama 3.1 8B Instruct AWQ" - }, - { - "id": "@cf/mistralai/mistral-small-3.1-24b-instruct", - "name": "Mistral Small 3.1 24B Instruct" - }, - { - "id": "@cf/meta/llama-3.1-70b-instruct-fp8-fast", - "name": "Llama 3.1 70B Instruct FP8 Fast" - }, - { - "id": "@cf/meta/llama-3.3-70b-instruct-fp8-fast", - "name": "Llama 3.3 70B Instruct FP8 Fast" - }, - { - "id": "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", - "name": "DeepSeek R1 Distill Qwen 32B" - }, - { - "id": "@cf/moonshotai/kimi-k2.5", - "name": "Kimi K2.5" - }, - { - "id": "@cf/moonshotai/kimi-k2.6", - "name": "Kimi K2.6" - }, - { - "id": "@cf/zai-org/glm-4.7-flash", - "name": "GLM 4.7 Flash" - }, - { - "id": "@cf/qwen/qwq-32b", - "name": "QwQ 32B" - }, - { - "id": "@cf/qwen/qwen2.5-coder-32b-instruct", - "name": "Qwen 2.5 Coder 32B Instruct" - }, - { - "id": "@cf/black-forest-labs/flux-2-klein-9b", - "name": "FLUX.2 Klein 9B", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "@cf/black-forest-labs/flux-2-klein-4b", - "name": "FLUX.2 Klein 4B", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "@cf/black-forest-labs/flux-2-dev", - "name": "FLUX.2 Dev", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "@cf/leonardo/lucid-origin", - "name": "Lucid Origin", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "@cf/leonardo/phoenix-1.0", - "name": "Phoenix 1.0", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "@cf/black-forest-labs/flux-1-schnell", - "name": "FLUX.1 Schnell", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "@cf/bytedance/stable-diffusion-xl-lightning", - "name": "SDXL Lightning", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "@cf/lykon/dreamshaper-8-lcm", - "name": "DreamShaper 8 LCM", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "@cf/runwayml/stable-diffusion-v1-5-img2img", - "name": "Stable Diffusion v1.5 Img2Img", - "type": "image", - "params": [ - "size" - ], - "capabilities": [ - "edit" - ] - }, - { - "id": "@cf/runwayml/stable-diffusion-v1-5-inpainting", - "name": "Stable Diffusion v1.5 Inpainting", - "type": "image", - "params": [ - "size" - ], - "capabilities": [ - "edit", - "mask" - ] - }, - { - "id": "@cf/stabilityai/stable-diffusion-xl-base-1.0", - "name": "SDXL Base 1.0", - "type": "image", - "params": [ - "size" - ] - } - ] + models: [ + { id: "@cf/meta/llama-3.2-1b-instruct", name: "Llama 3.2 1B Instruct" }, + { id: "@cf/meta/llama-3.2-3b-instruct", name: "Llama 3.2 3B Instruct" }, + { id: "@cf/meta/llama-3.1-8b-instruct-fp8-fast", name: "Llama 3.1 8B Instruct FP8 Fast" }, + { id: "@cf/meta/llama-3.1-8b-instruct-awq", name: "Llama 3.1 8B Instruct AWQ" }, + { id: "@cf/mistralai/mistral-small-3.1-24b-instruct", name: "Mistral Small 3.1 24B Instruct" }, + { id: "@cf/meta/llama-3.1-70b-instruct-fp8-fast", name: "Llama 3.1 70B Instruct FP8 Fast" }, + { id: "@cf/meta/llama-3.3-70b-instruct-fp8-fast", name: "Llama 3.3 70B Instruct FP8 Fast" }, + { id: "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b", name: "DeepSeek R1 Distill Qwen 32B" }, + { id: "@cf/moonshotai/kimi-k2.5", name: "Kimi K2.5" }, + { id: "@cf/moonshotai/kimi-k2.6", name: "Kimi K2.6" }, + { id: "@cf/zai-org/glm-4.7-flash", name: "GLM 4.7 Flash" }, + { id: "@cf/qwen/qwq-32b", name: "QwQ 32B" }, + { id: "@cf/qwen/qwen2.5-coder-32b-instruct", name: "Qwen 2.5 Coder 32B Instruct" }, + { id: "@cf/black-forest-labs/flux-2-klein-9b", name: "FLUX.2 Klein 9B", params: ["size"], kind: "image" }, + { id: "@cf/black-forest-labs/flux-2-klein-4b", name: "FLUX.2 Klein 4B", params: ["size"], kind: "image" }, + { id: "@cf/black-forest-labs/flux-2-dev", name: "FLUX.2 Dev", params: ["size"], kind: "image" }, + { id: "@cf/leonardo/lucid-origin", name: "Lucid Origin", params: ["size"], kind: "image" }, + { id: "@cf/leonardo/phoenix-1.0", name: "Phoenix 1.0", params: ["size"], kind: "image" }, + { id: "@cf/black-forest-labs/flux-1-schnell", name: "FLUX.1 Schnell", params: ["size"], kind: "image" }, + { id: "@cf/bytedance/stable-diffusion-xl-lightning", name: "SDXL Lightning", params: ["size"], kind: "image" }, + { id: "@cf/lykon/dreamshaper-8-lcm", name: "DreamShaper 8 LCM", params: ["size"], kind: "image" }, + { id: "@cf/runwayml/stable-diffusion-v1-5-img2img", name: "Stable Diffusion v1.5 Img2Img", params: ["size"], capabilities: ["edit"], kind: "image" }, + { id: "@cf/runwayml/stable-diffusion-v1-5-inpainting", name: "Stable Diffusion v1.5 Inpainting", params: ["size"], capabilities: ["edit","mask"], kind: "image" }, + { id: "@cf/stabilityai/stable-diffusion-xl-base-1.0", name: "SDXL Base 1.0", params: ["size"], kind: "image" }, + ], + serviceKinds: ["llm","image"], + imageConfig: { baseUrl: "https://api.cloudflare.com/client/v4/accounts" }, }; diff --git a/open-sse/providers/registry/codebuddy.js b/open-sse/providers/registry/codebuddy.js index 63ef79f4..b4601cad 100644 --- a/open-sse/providers/registry/codebuddy.js +++ b/open-sse/providers/registry/codebuddy.js @@ -1,18 +1,30 @@ - export default { - "id": "codebuddy", display: { name: "CodeBuddy", icon: "smart_toy", color: "#006EFF", website: "https://copilot.tencent.com", notice: { signupUrl: "https://copilot.tencent.com" } }, - category: "oauth", - "transport": { - "baseUrl": "https://copilot.tencent.com/v1/chat/completions", - auth: {"combined":true,"header":"Authorization","scheme":"bearer"}, + id: "codebuddy", + display: { + name: "CodeBuddy", + icon: "smart_toy", + color: "#006EFF", + website: "https://copilot.tencent.com", + notice: { + signupUrl: "https://copilot.tencent.com", + }, + }, + category: "oauth", + transport: { + baseUrl: "https://copilot.tencent.com/v1/chat/completions", + auth: { + combined: true, + header: "Authorization", + scheme: "bearer", + }, + }, + oauth: { + baseUrl: "https://copilot.tencent.com", + stateUrl: "https://copilot.tencent.com/v2/plugin/auth/state", + tokenUrl: "https://copilot.tencent.com/v2/plugin/auth/token", + refreshUrl: "https://copilot.tencent.com/v2/plugin/auth/token/refresh", + userAgent: "CLI/2.63.2 CodeBuddy/2.63.2", + platform: "CLI", + pollInterval: 5000, }, - "oauth": { - "baseUrl": "https://copilot.tencent.com", - "stateUrl": "https://copilot.tencent.com/v2/plugin/auth/state", - "tokenUrl": "https://copilot.tencent.com/v2/plugin/auth/token", - "refreshUrl": "https://copilot.tencent.com/v2/plugin/auth/token/refresh", - "userAgent": "CLI/2.63.2 CodeBuddy/2.63.2", - "platform": "CLI", - "pollInterval": 5000 - } }; diff --git a/open-sse/providers/registry/codex.js b/open-sse/providers/registry/codex.js index a4543f1d..cc86af31 100644 --- a/open-sse/providers/registry/codex.js +++ b/open-sse/providers/registry/codex.js @@ -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}, }; diff --git a/open-sse/providers/registry/cohere.js b/open-sse/providers/registry/cohere.js index 68351cea..2dd880de 100644 --- a/open-sse/providers/registry/cohere.js +++ b/open-sse/providers/registry/cohere.js @@ -1,34 +1,24 @@ - export default { - "id": "cohere", - "alias": "cohere", + id: "cohere", + alias: "cohere", display: { - "name": "Cohere", - "icon": "hub", - "color": "#39594D", - "textIcon": "CO", - "website": "https://cohere.com", - "notice": { - "apiKeyUrl": "https://dashboard.cohere.com/api-keys" - } + name: "Cohere", + icon: "hub", + color: "#39594D", + textIcon: "CO", + website: "https://cohere.com", + notice: { + apiKeyUrl: "https://dashboard.cohere.com/api-keys", + }, }, category: "apikey", - "transport": { - "baseUrl": "https://api.cohere.ai/v1/chat/completions", - "validateUrl": "https://api.cohere.ai/v1/models" + transport: { + baseUrl: "https://api.cohere.ai/v1/chat/completions", + validateUrl: "https://api.cohere.ai/v1/models", }, - "models": [ - { - "id": "command-r-plus-08-2024", - "name": "Command R+ (Aug 2024)" - }, - { - "id": "command-r-08-2024", - "name": "Command R (Aug 2024)" - }, - { - "id": "command-a-03-2025", - "name": "Command A (Mar 2025)" - } - ] + models: [ + { id: "command-r-plus-08-2024", name: "Command R+ (Aug 2024)" }, + { id: "command-r-08-2024", name: "Command R (Aug 2024)" }, + { id: "command-a-03-2025", name: "Command A (Mar 2025)" }, + ], }; diff --git a/open-sse/providers/registry/comfyui.js b/open-sse/providers/registry/comfyui.js index 183e2b96..bfe7554f 100644 --- a/open-sse/providers/registry/comfyui.js +++ b/open-sse/providers/registry/comfyui.js @@ -1,38 +1,19 @@ - export default { - "id": "comfyui", - "alias": "comfyui", + id: "comfyui", + alias: "comfyui", display: { - "name": "ComfyUI", - "icon": "account_tree", - "color": "#4CAF50", - "textIcon": "CF", - "website": "https://github.com/comfyanonymous/ComfyUI" + name: "ComfyUI", + icon: "account_tree", + color: "#4CAF50", + textIcon: "CF", + website: "https://github.com/comfyanonymous/ComfyUI", }, category: "apikey", - "transport": null, - media: { - serviceKinds: ["image"], - imageConfig: { baseUrl: "http://localhost:8188" } - }, - "models": [ - { - "id": "flux-dev", - "name": "FLUX Dev", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "sdxl", - "name": "SDXL", - "type": "image", - "params": [ - "n", - "size" - ] - } - ] + transport: null, + models: [ + { id: "flux-dev", name: "FLUX Dev", params: ["n","size"], kind: "image" }, + { id: "sdxl", name: "SDXL", params: ["n","size"], kind: "image" }, + ], + serviceKinds: ["image"], + imageConfig: { baseUrl: "http://localhost:8188" }, }; diff --git a/open-sse/providers/registry/commandcode.js b/open-sse/providers/registry/commandcode.js index 25adf96a..b758dfcc 100644 --- a/open-sse/providers/registry/commandcode.js +++ b/open-sse/providers/registry/commandcode.js @@ -1,73 +1,42 @@ export default { - "id": "commandcode", - "alias": "commandcode", + id: "commandcode", + alias: "commandcode", + aliases: [ + "cmc", + ], + uiAlias: "cmc", display: { - "name": "Command Code", - "icon": "smart_toy", - "color": "#000000", - "textIcon": "CC", - "website": "https://commandcode.ai", - "notice": { - "text": "Use your CommandCode CLI API key (starts with user_...) from ~/.commandcode/auth.json or commandcode.ai/studio.", - "apiKeyUrl": "https://commandcode.ai/studio" - } + name: "Command Code", + icon: "smart_toy", + color: "#000000", + textIcon: "CC", + website: "https://commandcode.ai", + notice: { + text: "Use your CommandCode CLI API key (starts with user_...) from ~/.commandcode/auth.json or commandcode.ai/studio.", + apiKeyUrl: "https://commandcode.ai/studio", + }, }, category: "apikey", - uiAlias: "cmc", - aliases: ["cmc"], - "transport": { - "baseUrl": "https://api.commandcode.ai/alpha/generate", - "format": "commandcode", - "forceStream": true, - "headers": { + transport: { + baseUrl: "https://api.commandcode.ai/alpha/generate", + format: "commandcode", + forceStream: true, + headers: { "x-command-code-version": "0.25.7", - "x-cli-environment": "cli" - } + "x-cli-environment": "cli", + }, }, - "models": [ - { - "id": "deepseek/deepseek-v4-pro", - "name": "DeepSeek V4 Pro" - }, - { - "id": "deepseek/deepseek-v4-flash", - "name": "DeepSeek V4 Flash" - }, - { - "id": "moonshotai/Kimi-K2.6", - "name": "Kimi K2.6" - }, - { - "id": "moonshotai/Kimi-K2.5", - "name": "Kimi K2.5" - }, - { - "id": "zai-org/GLM-5.1", - "name": "GLM 5.1" - }, - { - "id": "zai-org/GLM-5", - "name": "GLM 5" - }, - { - "id": "MiniMaxAI/MiniMax-M2.7", - "name": "MiniMax M2.7" - }, - { - "id": "MiniMaxAI/MiniMax-M2.5", - "name": "MiniMax M2.5" - }, - { - "id": "Qwen/Qwen3.6-Max-Preview", - "name": "Qwen 3.6 Max Preview" - }, - { - "id": "Qwen/Qwen3.6-Plus", - "name": "Qwen 3.6 Plus" - }, - { - "id": "stepfun/Step-3.5-Flash", - "name": "Step 3.5 Flash" - } - ] + models: [ + { id: "deepseek/deepseek-v4-pro", name: "DeepSeek V4 Pro" }, + { id: "deepseek/deepseek-v4-flash", name: "DeepSeek V4 Flash" }, + { id: "moonshotai/Kimi-K2.6", name: "Kimi K2.6" }, + { id: "moonshotai/Kimi-K2.5", name: "Kimi K2.5" }, + { id: "zai-org/GLM-5.1", name: "GLM 5.1" }, + { id: "zai-org/GLM-5", name: "GLM 5" }, + { id: "MiniMaxAI/MiniMax-M2.7", name: "MiniMax M2.7" }, + { id: "MiniMaxAI/MiniMax-M2.5", name: "MiniMax M2.5" }, + { id: "Qwen/Qwen3.6-Max-Preview", name: "Qwen 3.6 Max Preview" }, + { id: "Qwen/Qwen3.6-Plus", name: "Qwen 3.6 Plus" }, + { id: "stepfun/Step-3.5-Flash", name: "Step 3.5 Flash" }, + ], }; diff --git a/open-sse/providers/registry/cursor.js b/open-sse/providers/registry/cursor.js index 0fc7e49b..a3e38c65 100644 --- a/open-sse/providers/registry/cursor.js +++ b/open-sse/providers/registry/cursor.js @@ -1,100 +1,57 @@ - export default { - "id": "cursor", - "alias": "cu", + id: "cursor", + alias: "cu", + uiAlias: "cu", display: { - "name": "Cursor IDE", - "icon": "edit_note", - "color": "#00D4AA", - "website": "https://cursor.com", - "notice": { - "signupUrl": "https://cursor.com" - } + name: "Cursor IDE", + icon: "edit_note", + color: "#00D4AA", + website: "https://cursor.com", + notice: { + signupUrl: "https://cursor.com", + }, }, category: "oauth", - uiAlias: "cu", - "transport": { - "baseUrl": "https://api2.cursor.sh", - "chatPath": "/aiserver.v1.ChatService/StreamUnifiedChatWithTools", - "format": "cursor", - "headers": { + transport: { + baseUrl: "https://api2.cursor.sh", + chatPath: "/aiserver.v1.ChatService/StreamUnifiedChatWithTools", + format: "cursor", + headers: { "connect-accept-encoding": "gzip", "connect-protocol-version": "1", "Content-Type": "application/connect+proto", - "User-Agent": "connect-es/1.6.1" + "User-Agent": "connect-es/1.6.1", }, - "clientVersion": "3.1.0" + clientVersion: "3.1.0", }, - "oauth": { - "apiEndpoint": "https://api2.cursor.sh", - "chatEndpoint": "/aiserver.v1.ChatService/StreamUnifiedChatWithTools", - "modelsEndpoint": "/aiserver.v1.AiService/GetDefaultModelNudgeData", - "api3Endpoint": "https://api3.cursor.sh", - "agentEndpoint": "https://agent.api5.cursor.sh", - "agentNonPrivacyEndpoint": "https://agentn.api5.cursor.sh", - "clientVersion": "3.1.0", - "clientType": "ide", - "dbKeys": { - "accessToken": "cursorAuth/accessToken", - "machineId": "storage.serviceMachineId" - } + models: [ + { id: "default", name: "Auto (Server Picks)" }, + { id: "claude-4.5-opus-high-thinking", name: "Claude 4.5 Opus High Thinking" }, + { id: "claude-4.5-opus-high", name: "Claude 4.5 Opus High" }, + { id: "claude-4.5-sonnet-thinking", name: "Claude 4.5 Sonnet Thinking" }, + { id: "claude-4.5-sonnet", name: "Claude 4.5 Sonnet" }, + { id: "claude-4.5-haiku", name: "Claude 4.5 Haiku" }, + { id: "claude-4.5-opus", name: "Claude 4.5 Opus" }, + { id: "gpt-5.2-codex", name: "GPT 5.2 Codex" }, + { id: "claude-4.6-opus-max", name: "Claude 4.6 Opus Max" }, + { id: "claude-4.6-sonnet-medium-thinking", name: "Claude 4.6 Sonnet Medium Thinking" }, + { id: "kimi-k2.5", name: "Kimi K2.5" }, + { id: "gemini-3-flash-preview", name: "Gemini 3 Flash Preview" }, + { id: "gpt-5.2", name: "GPT 5.2" }, + { id: "gpt-5.3-codex", name: "GPT 5.3 Codex" }, + ], + oauth: { + apiEndpoint: "https://api2.cursor.sh", + chatEndpoint: "/aiserver.v1.ChatService/StreamUnifiedChatWithTools", + modelsEndpoint: "/aiserver.v1.AiService/GetDefaultModelNudgeData", + api3Endpoint: "https://api3.cursor.sh", + agentEndpoint: "https://agent.api5.cursor.sh", + agentNonPrivacyEndpoint: "https://agentn.api5.cursor.sh", + clientVersion: "3.1.0", + clientType: "ide", + dbKeys: { + accessToken: "cursorAuth/accessToken", + machineId: "storage.serviceMachineId", + }, }, - "models": [ - { - "id": "default", - "name": "Auto (Server Picks)" - }, - { - "id": "claude-4.5-opus-high-thinking", - "name": "Claude 4.5 Opus High Thinking" - }, - { - "id": "claude-4.5-opus-high", - "name": "Claude 4.5 Opus High" - }, - { - "id": "claude-4.5-sonnet-thinking", - "name": "Claude 4.5 Sonnet Thinking" - }, - { - "id": "claude-4.5-sonnet", - "name": "Claude 4.5 Sonnet" - }, - { - "id": "claude-4.5-haiku", - "name": "Claude 4.5 Haiku" - }, - { - "id": "claude-4.5-opus", - "name": "Claude 4.5 Opus" - }, - { - "id": "gpt-5.2-codex", - "name": "GPT 5.2 Codex" - }, - { - "id": "claude-4.6-opus-max", - "name": "Claude 4.6 Opus Max" - }, - { - "id": "claude-4.6-sonnet-medium-thinking", - "name": "Claude 4.6 Sonnet Medium Thinking" - }, - { - "id": "kimi-k2.5", - "name": "Kimi K2.5" - }, - { - "id": "gemini-3-flash-preview", - "name": "Gemini 3 Flash Preview" - }, - { - "id": "gpt-5.2", - "name": "GPT 5.2" - }, - { - "id": "gpt-5.3-codex", - "name": "GPT 5.3 Codex" - } - ] }; diff --git a/open-sse/providers/registry/deepgram.js b/open-sse/providers/registry/deepgram.js index b3662466..5f3727a6 100644 --- a/open-sse/providers/registry/deepgram.js +++ b/open-sse/providers/registry/deepgram.js @@ -1,53 +1,32 @@ - export default { - "id": "deepgram", - "alias": "deepgram", + id: "deepgram", + alias: "deepgram", + aliases: [ + "dg", + ], + uiAlias: "dg", display: { - "name": "Deepgram", - "icon": "mic", - "color": "#13EF93", - "textIcon": "DG", - "website": "https://deepgram.com", - "notice": { - "text": "$200 free credit on signup (no card required). Aura-1: $0.015/1k chars, Aura-2: $0.030/1k chars (Pay-As-You-Go).", - "apiKeyUrl": "https://console.deepgram.com/api-keys" - } + name: "Deepgram", + icon: "mic", + color: "#13EF93", + textIcon: "DG", + website: "https://deepgram.com", + notice: { + text: "$200 free credit on signup (no card required). Aura-1: $0.015/1k chars, Aura-2: $0.030/1k chars (Pay-As-You-Go).", + apiKeyUrl: "https://console.deepgram.com/api-keys", + }, }, category: "apikey", - uiAlias: "dg", authType: "apikey", - aliases: ["dg"], - "transport": { - "baseUrl": "https://api.deepgram.com/v1/listen" + transport: { + baseUrl: "https://api.deepgram.com/v1/listen", }, - media: { - serviceKinds: ["stt"], - sttConfig: { baseUrl: "https://api.deepgram.com/v1/listen", authType: "apikey", authHeader: "token", format: "deepgram", models: [{ id: "nova-3", name: "Nova 3" }, { id: "nova-2", name: "Nova 2" }, { id: "nova", name: "Nova" }] } - }, - "models": [ - { - "id": "nova-3", - "name": "Nova 3", - "type": "stt", - "params": [ - "language" - ] - }, - { - "id": "nova-2", - "name": "Nova 2", - "type": "stt", - "params": [ - "language" - ] - }, - { - "id": "whisper-large", - "name": "Whisper Large", - "type": "stt", - "params": [ - "language" - ] - } - ] + models: [ + { id: "nova-3", name: "Nova 3", params: ["language"], kind: "stt" }, + { id: "nova-2", name: "Nova 2", params: ["language"], kind: "stt" }, + { id: "whisper-large", name: "Whisper Large", params: ["language"], kind: "stt" }, + { id: "nova", name: "Nova", kind: "stt" }, + ], + serviceKinds: ["stt"], + sttConfig: { baseUrl: "https://api.deepgram.com/v1/listen", authType: "apikey", authHeader: "token", format: "deepgram" }, }; diff --git a/open-sse/providers/registry/deepseek.js b/open-sse/providers/registry/deepseek.js index 343abe4e..66739db8 100644 --- a/open-sse/providers/registry/deepseek.js +++ b/open-sse/providers/registry/deepseek.js @@ -1,51 +1,34 @@ - export default { - "id": "deepseek", - "alias": "deepseek", + id: "deepseek", + alias: "deepseek", + aliases: [ + "ds", + ], + uiAlias: "ds", display: { - "name": "DeepSeek", - "icon": "bolt", - "color": "#4D6BFE", - "textIcon": "DS", - "website": "https://deepseek.com", - "notice": { - "apiKeyUrl": "https://platform.deepseek.com/api_keys" - } + name: "DeepSeek", + icon: "bolt", + color: "#4D6BFE", + textIcon: "DS", + website: "https://deepseek.com", + notice: { + apiKeyUrl: "https://platform.deepseek.com/api_keys", + }, }, category: "apikey", - uiAlias: "ds", - aliases: ["ds"], - "transport": { - "baseUrl": "https://api.deepseek.com/chat/completions", - "validateUrl": "https://api.deepseek.com/models", - reasoningInject: { scope: "all" } + transport: { + baseUrl: "https://api.deepseek.com/chat/completions", + validateUrl: "https://api.deepseek.com/models", + reasoningInject: { + scope: "all", + }, }, - "models": [ - { - "id": "deepseek-v4-pro", - "name": "DeepSeek V4 Pro" - }, - { - "id": "deepseek-v4-pro-max", - "name": "DeepSeek V4 Pro Max", - "upstreamModelId": "deepseek-v4-pro" - }, - { - "id": "deepseek-v4-pro-none", - "name": "DeepSeek V4 Pro No Thinking", - "upstreamModelId": "deepseek-v4-pro" - }, - { - "id": "deepseek-v4-flash", - "name": "DeepSeek V4 Flash" - }, - { - "id": "deepseek-chat", - "name": "DeepSeek V3.2 Chat" - }, - { - "id": "deepseek-reasoner", - "name": "DeepSeek V3.2 Reasoner" - } - ] + models: [ + { id: "deepseek-v4-pro", name: "DeepSeek V4 Pro" }, + { id: "deepseek-v4-pro-max", name: "DeepSeek V4 Pro Max", upstreamModelId: "deepseek-v4-pro" }, + { id: "deepseek-v4-pro-none", name: "DeepSeek V4 Pro No Thinking", upstreamModelId: "deepseek-v4-pro" }, + { id: "deepseek-v4-flash", name: "DeepSeek V4 Flash" }, + { id: "deepseek-chat", name: "DeepSeek V3.2 Chat" }, + { id: "deepseek-reasoner", name: "DeepSeek V3.2 Reasoner" }, + ], }; diff --git a/open-sse/providers/registry/fal-ai.js b/open-sse/providers/registry/fal-ai.js index 2bddd9b7..79cc3b50 100644 --- a/open-sse/providers/registry/fal-ai.js +++ b/open-sse/providers/registry/fal-ai.js @@ -1,91 +1,32 @@ - export default { - "id": "fal-ai", - "alias": "fal-ai", + id: "fal-ai", + alias: "fal-ai", + aliases: [ + "fal", + ], + uiAlias: "fal", display: { - "name": "Fal.ai", - "icon": "image", - "color": "#2563EB", - "textIcon": "FL", - "website": "https://fal.ai", - "notice": { - "apiKeyUrl": "https://fal.ai/dashboard/keys" - } + name: "Fal.ai", + icon: "image", + color: "#2563EB", + textIcon: "FL", + website: "https://fal.ai", + notice: { + apiKeyUrl: "https://fal.ai/dashboard/keys", + }, }, category: "apikey", - uiAlias: "fal", authType: "apikey", - aliases: ["fal"], - "transport": null, - media: { - serviceKinds: ["image"], - imageConfig: { baseUrl: "https://queue.fal.run" } - }, - "models": [ - { - "id": "fal-ai/flux/schnell", - "name": "FLUX Schnell", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "fal-ai/flux/dev", - "name": "FLUX Dev", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "fal-ai/flux-pro/v1.1", - "name": "FLUX Pro v1.1", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "fal-ai/flux-pro/v1.1-ultra", - "name": "FLUX Pro v1.1 Ultra", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "fal-ai/recraft-v3", - "name": "Recraft V3", - "type": "image", - "params": [ - "n", - "size", - "style" - ] - }, - { - "id": "fal-ai/ideogram/v2", - "name": "Ideogram V2", - "type": "image", - "params": [ - "n", - "size", - "style" - ] - }, - { - "id": "fal-ai/stable-diffusion-v35-large", - "name": "SD 3.5 Large", - "type": "image", - "params": [ - "n", - "size" - ] - } - ] + transport: null, + models: [ + { id: "fal-ai/flux/schnell", name: "FLUX Schnell", params: ["n","size"], kind: "image" }, + { id: "fal-ai/flux/dev", name: "FLUX Dev", params: ["n","size"], kind: "image" }, + { id: "fal-ai/flux-pro/v1.1", name: "FLUX Pro v1.1", params: ["n","size"], kind: "image" }, + { id: "fal-ai/flux-pro/v1.1-ultra", name: "FLUX Pro v1.1 Ultra", params: ["n","size"], kind: "image" }, + { id: "fal-ai/recraft-v3", name: "Recraft V3", params: ["n","size","style"], kind: "image" }, + { id: "fal-ai/ideogram/v2", name: "Ideogram V2", params: ["n","size","style"], kind: "image" }, + { id: "fal-ai/stable-diffusion-v35-large", name: "SD 3.5 Large", params: ["n","size"], kind: "image" }, + ], + serviceKinds: ["image"], + imageConfig: { baseUrl: "https://queue.fal.run" }, }; diff --git a/open-sse/providers/registry/fireworks.js b/open-sse/providers/registry/fireworks.js index 14fe0f2e..62dcea62 100644 --- a/open-sse/providers/registry/fireworks.js +++ b/open-sse/providers/registry/fireworks.js @@ -1,43 +1,27 @@ - export default { - "id": "fireworks", - "alias": "fireworks", + id: "fireworks", + alias: "fireworks", display: { - "name": "Fireworks AI", - "icon": "local_fire_department", - "color": "#7B2EF2", - "textIcon": "FW", - "website": "https://fireworks.ai", - "notice": { - "apiKeyUrl": "https://fireworks.ai/account/api-keys" - } + name: "Fireworks AI", + icon: "local_fire_department", + color: "#7B2EF2", + textIcon: "FW", + website: "https://fireworks.ai", + notice: { + apiKeyUrl: "https://fireworks.ai/account/api-keys", + }, }, category: "apikey", authType: "apikey", - "transport": { - "baseUrl": "https://api.fireworks.ai/inference/v1/chat/completions", - "validateUrl": "https://api.fireworks.ai/inference/v1/models" + transport: { + baseUrl: "https://api.fireworks.ai/inference/v1/chat/completions", + validateUrl: "https://api.fireworks.ai/inference/v1/models", }, - media: { - embeddingConfig: { baseUrl: "https://api.fireworks.ai/inference/v1/embeddings" } - }, - "models": [ - { - "id": "accounts/fireworks/models/deepseek-v3p1", - "name": "DeepSeek V3.1" - }, - { - "id": "accounts/fireworks/models/llama-v3p3-70b-instruct", - "name": "Llama 3.3 70B" - }, - { - "id": "accounts/fireworks/models/qwen3-235b-a22b", - "name": "Qwen3 235B" - }, - { - "id": "nomic-ai/nomic-embed-text-v1.5", - "name": "Nomic Embed Text v1.5", - "type": "embedding" - } - ] + models: [ + { id: "accounts/fireworks/models/deepseek-v3p1", name: "DeepSeek V3.1" }, + { id: "accounts/fireworks/models/llama-v3p3-70b-instruct", name: "Llama 3.3 70B" }, + { id: "accounts/fireworks/models/qwen3-235b-a22b", name: "Qwen3 235B" }, + { id: "nomic-ai/nomic-embed-text-v1.5", name: "Nomic Embed Text v1.5", kind: "embedding" }, + ], + embeddingConfig: { baseUrl: "https://api.fireworks.ai/inference/v1/embeddings" }, }; diff --git a/open-sse/providers/registry/gemini-cli.js b/open-sse/providers/registry/gemini-cli.js index 44cf9d52..844f393a 100644 --- a/open-sse/providers/registry/gemini-cli.js +++ b/open-sse/providers/registry/gemini-cli.js @@ -1,53 +1,51 @@ import { GOOGLE_OAUTH_CLIENT } from "../shared.js"; export default { - "id": "gemini-cli", - "alias": "gc", + id: "gemini-cli", + alias: "gc", + uiAlias: "gc", display: { - "name": "Gemini CLI", - "icon": "terminal", - "color": "#4285F4", - "website": "https://github.com/google-gemini/gemini-cli", - "notice": { - "signupUrl": "https://github.com/google-gemini/gemini-cli" - }, - "deprecated": true, - "deprecationNotice": "RISK_NOTICE" + name: "Gemini CLI", + icon: "terminal", + color: "#4285F4", + website: "https://github.com/google-gemini/gemini-cli", + notice: { + signupUrl: "https://github.com/google-gemini/gemini-cli", + }, + deprecated: true, + deprecationNotice: "RISK_NOTICE", }, category: "free", - uiAlias: "gc", - "transport": { - "baseUrl": "https://cloudcode-pa.googleapis.com/v1internal", - "format": "gemini-cli", + transport: { + baseUrl: "https://cloudcode-pa.googleapis.com/v1internal", + format: "gemini-cli", cliVersion: "0.34.0", apiClient: "google-genai-sdk/1.41.0 gl-node/v22.19.0", usage: { quotaUrl: "https://cloudcode-pa.googleapis.com/v1internal:retrieveUserQuota", - loadCodeAssistUrl: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist" + loadCodeAssistUrl: "https://cloudcode-pa.googleapis.com/v1internal:loadCodeAssist", }, - ...GOOGLE_OAUTH_CLIENT + clientId: "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com", + clientSecret: "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", }, - "oauth": { - "authorizeUrl": "https://accounts.google.com/o/oauth2/v2/auth", - "tokenUrl": "https://oauth2.googleapis.com/token", - "userInfoUrl": "https://www.googleapis.com/oauth2/v1/userinfo", - "scopes": [ + models: [ + { id: "gemini-3-flash-preview", name: "Gemini 3 Flash Preview" }, + { id: "gemini-3-pro-preview", name: "Gemini 3 Pro Preview" }, + ], + oauth: { + authorizeUrl: "https://accounts.google.com/o/oauth2/v2/auth", + tokenUrl: "https://oauth2.googleapis.com/token", + userInfoUrl: "https://www.googleapis.com/oauth2/v1/userinfo", + scopes: [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/userinfo.email", - "https://www.googleapis.com/auth/userinfo.profile" - ] - , - refresh: {"encoding":"form"} - }, - "models": [ - { - "id": "gemini-3-flash-preview", - "name": "Gemini 3 Flash Preview" + "https://www.googleapis.com/auth/userinfo.profile", + ], + refresh: { + encoding: "form", }, - { - "id": "gemini-3-pro-preview", - "name": "Gemini 3 Pro Preview" - } - ], - features: {"usage":true}, + }, + features: { + usage: true, + }, }; diff --git a/open-sse/providers/registry/gemini.js b/open-sse/providers/registry/gemini.js index d94afa99..a044883b 100644 --- a/open-sse/providers/registry/gemini.js +++ b/open-sse/providers/registry/gemini.js @@ -1,144 +1,80 @@ import { GOOGLE_OAUTH_CLIENT } from "../shared.js"; export default { - "id": "gemini", - "alias": "gemini", + id: "gemini", + alias: "gemini", display: { - "name": "Gemini", - "icon": "diamond", - "color": "#4285F4", - "textIcon": "GE", - "website": "https://ai.google.dev", - "notice": { - "apiKeyUrl": "https://aistudio.google.com/app/apikey" - }, - "mediaPriority": 1 + name: "Gemini", + icon: "diamond", + color: "#4285F4", + textIcon: "GE", + website: "https://ai.google.dev", + notice: { + apiKeyUrl: "https://aistudio.google.com/app/apikey", + }, + mediaPriority: 1, }, category: "freeTier", - "transport": { - "baseUrl": "https://generativelanguage.googleapis.com/v1beta/models", - "format": "gemini", - ...GOOGLE_OAUTH_CLIENT, - auth: {"apiKey":{"header":"x-goog-api-key","scheme":"raw"},"oauth":{"header":"Authorization","scheme":"bearer"}}, + transport: { + baseUrl: "https://generativelanguage.googleapis.com/v1beta/models", + format: "gemini", + clientId: "681255809395-oo8ft2oprdrnp9e3aqf6av3hmdib135j.apps.googleusercontent.com", + clientSecret: "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", + auth: { + apiKey: { + header: "x-goog-api-key", + scheme: "raw", + }, + oauth: { + header: "Authorization", + scheme: "bearer", + }, + }, }, - media: { - serviceKinds: ["llm", "embedding", "image", "imageToText", "webSearch", "tts", "stt"], - ttsConfig: { baseUrl: "https://generativelanguage.googleapis.com/v1beta/models", authType: "apikey", authHeader: "key", format: "gemini-tts", models: [{ id: "gemini-2.5-flash-preview-tts", name: "Gemini 2.5 Flash TTS" }, { id: "gemini-2.5-pro-preview-tts", name: "Gemini 2.5 Pro TTS" }] }, - sttConfig: { baseUrl: "https://generativelanguage.googleapis.com/v1beta/models", authType: "apikey", authHeader: "key", format: "gemini-stt", models: [{ id: "gemini-2.5-pro", name: "Gemini 2.5 Pro (Best)" }, { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash" }, { id: "gemini-2.5-flash-lite", name: "Gemini 2.5 Flash Lite (Cheapest)" }, { id: "gemini-2.0-flash", name: "Gemini 2.0 Flash" }] }, - embeddingConfig: { baseUrl: "https://generativelanguage.googleapis.com/v1beta/models", authType: "apikey", authHeader: "key", models: [{ id: "text-embedding-004", name: "Text Embedding 004", dimensions: 768 }, { id: "embedding-001", name: "Embedding 001", dimensions: 768 }] }, - searchViaChat: { defaultModel: "gemini-2.5-flash", endpoint: "https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent", pricingUrl: "https://ai.google.dev/pricing", freeTier: "Free tier: 15 RPM, 1M tokens/day on gemini-2.5-flash via AI Studio." }, - imageConfig: { baseUrl: "https://generativelanguage.googleapis.com/v1beta/models" } - }, - "models": [ - { - "id": "gemini-3.1-pro-preview", - "name": "Gemini 3.1 Pro Preview" - }, - { - "id": "gemini-3.1-flash-lite-preview", - "name": "Gemini 3.1 Flash Lite Preview" - }, - { - "id": "gemini-3-flash-preview", - "name": "Gemini 3 Flash Preview" - }, - { - "id": "gemini-2.5-pro", - "name": "Gemini 2.5 Pro" - }, - { - "id": "gemini-2.5-flash", - "name": "Gemini 2.5 Flash" - }, - { - "id": "gemini-2.5-flash-lite", - "name": "Gemini 2.5 Flash Lite" - }, - { - "id": "gemini-2.0-flash", - "name": "Gemini 2.0 Flash" - }, - { - "id": "gemini-2.0-flash-lite", - "name": "Gemini 2.0 Flash Lite" - }, - { - "id": "gemma-4-31b-it", - "name": "Gemma 4 31B IT" - }, - { - "id": "gemini-embedding-2-preview", - "name": "Gemini Embedding 2 Preview", - "type": "embedding" - }, - { - "id": "gemini-embedding-001", - "name": "Gemini Embedding 001", - "type": "embedding" - }, - { - "id": "text-embedding-005", - "name": "Text Embedding 005", - "type": "embedding" - }, - { - "id": "text-embedding-004", - "name": "Text Embedding 004 (Legacy)", - "type": "embedding" - }, - { - "id": "gemini-3.1-flash-image-preview", - "name": "Gemini 3.1 Flash Image (Nano Banana 2)", - "type": "image", - "params": [] - }, - { - "id": "gemini-3-pro-image-preview", - "name": "Gemini 3 Pro Image (Nano Banana Pro)", - "type": "image", - "params": [] - }, - { - "id": "gemini-2.5-flash-image", - "name": "Gemini 2.5 Flash Image (Nano Banana)", - "type": "image", - "params": [] - }, - { - "id": "gemini-2.5-pro", - "name": "Gemini 2.5 Pro (Best)", - "type": "stt", - "params": [ - "language", - "prompt" - ] - }, - { - "id": "gemini-2.5-flash", - "name": "Gemini 2.5 Flash", - "type": "stt", - "params": [ - "language", - "prompt" - ] - }, - { - "id": "gemini-2.5-flash-lite", - "name": "Gemini 2.5 Flash Lite (Cheapest)", - "type": "stt", - "params": [ - "language", - "prompt" - ] - }, - { - "id": "gemini-2.0-flash", - "name": "Gemini 2.0 Flash", - "type": "stt", - "params": [ - "language", - "prompt" - ] - } + models: [ + { id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro Preview" }, + { id: "gemini-3.1-flash-lite-preview", name: "Gemini 3.1 Flash Lite Preview" }, + { id: "gemini-3-flash-preview", name: "Gemini 3 Flash Preview" }, + { id: "gemini-2.5-pro", name: "Gemini 2.5 Pro" }, + { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash" }, + { id: "gemini-2.5-flash-lite", name: "Gemini 2.5 Flash Lite" }, + { id: "gemini-2.0-flash", name: "Gemini 2.0 Flash" }, + { id: "gemini-2.0-flash-lite", name: "Gemini 2.0 Flash Lite" }, + { id: "gemma-4-31b-it", name: "Gemma 4 31B IT" }, + { id: "gemini-embedding-2-preview", name: "Gemini Embedding 2 Preview", kind: "embedding" }, + { id: "gemini-embedding-001", name: "Gemini Embedding 001", kind: "embedding" }, + { id: "text-embedding-005", name: "Text Embedding 005", kind: "embedding" }, + { id: "text-embedding-004", name: "Text Embedding 004 (Legacy)", kind: "embedding" }, + { id: "gemini-3.1-flash-image-preview", name: "Gemini 3.1 Flash Image (Nano Banana 2)", params: [], kind: "image" }, + { id: "gemini-3-pro-image-preview", name: "Gemini 3 Pro Image (Nano Banana Pro)", params: [], kind: "image" }, + { id: "gemini-2.5-flash-image", name: "Gemini 2.5 Flash Image (Nano Banana)", params: [], kind: "image" }, + { id: "gemini-2.5-pro", name: "Gemini 2.5 Pro (Best)", params: ["language","prompt"], kind: "stt" }, + { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash", params: ["language","prompt"], kind: "stt" }, + { id: "gemini-2.5-flash-lite", name: "Gemini 2.5 Flash Lite (Cheapest)", params: ["language","prompt"], kind: "stt" }, + { id: "gemini-2.0-flash", name: "Gemini 2.0 Flash", params: ["language","prompt"], kind: "stt" }, + { id: "gemini-2.5-flash-preview-tts", name: "Gemini 2.5 Flash TTS", kind: "tts" }, + { id: "gemini-2.5-pro-preview-tts", name: "Gemini 2.5 Pro TTS", kind: "tts" }, + { id: "embedding-001", name: "Embedding 001", dimensions: 768, kind: "embedding" }, ], + serviceKinds: ["llm","embedding","image","imageToText","webSearch","tts","stt"], + ttsConfig: { + baseUrl: "https://generativelanguage.googleapis.com/v1beta/models", + authType: "apikey", + authHeader: "key", + format: "gemini-tts", + }, + sttConfig: { + baseUrl: "https://generativelanguage.googleapis.com/v1beta/models", + authType: "apikey", + authHeader: "key", + format: "gemini-stt", + }, + embeddingConfig: { baseUrl: "https://generativelanguage.googleapis.com/v1beta/models", authType: "apikey", authHeader: "key" }, + imageConfig: { baseUrl: "https://generativelanguage.googleapis.com/v1beta/models" }, + searchViaChat: { + defaultModel: "gemini-2.5-flash", + endpoint: "https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent", + pricingUrl: "https://ai.google.dev/pricing", + freeTier: "Free tier: 15 RPM, 1M tokens/day on gemini-2.5-flash via AI Studio.", + }, }; diff --git a/open-sse/providers/registry/github.js b/open-sse/providers/registry/github.js index f017b376..0e8812a2 100644 --- a/open-sse/providers/registry/github.js +++ b/open-sse/providers/registry/github.js @@ -1,24 +1,23 @@ - export default { - "id": "github", - "alias": "gh", + id: "github", + alias: "gh", + uiAlias: "gh", display: { - "name": "GitHub Copilot", - "icon": "code", - "color": "#333333", - "website": "https://github.com/features/copilot", - "notice": { - "signupUrl": "https://github.com/features/copilot" - }, - "deprecated": true, - "deprecationNotice": "RISK_NOTICE" + name: "GitHub Copilot", + icon: "code", + color: "#333333", + website: "https://github.com/features/copilot", + notice: { + signupUrl: "https://github.com/features/copilot", + }, + deprecated: true, + deprecationNotice: "RISK_NOTICE", }, category: "oauth", - uiAlias: "gh", - "transport": { - "baseUrl": "https://api.githubcopilot.com/chat/completions", - "responsesUrl": "https://api.githubcopilot.com/responses", - "headers": { + transport: { + baseUrl: "https://api.githubcopilot.com/chat/completions", + responsesUrl: "https://api.githubcopilot.com/responses", + headers: { "copilot-integration-id": "vscode-chat", "editor-version": "vscode/1.110.0", "editor-plugin-version": "copilot-chat/0.38.0", @@ -27,136 +26,63 @@ export default { "x-github-api-version": "2025-04-01", "x-vscode-user-agent-library-version": "electron-fetch", "X-Initiator": "user", - "Accept": "application/json", - "Content-Type": "application/json" + Accept: "application/json", + "Content-Type": "application/json", + }, + copilot: { + vscodeVersion: "1.110.0", + chatVersion: "0.38.0", + userAgent: "GitHubCopilotChat/0.38.0", + apiVersion: "2025-04-01", + }, + usage: { + url: "https://api.github.com/copilot_internal/user", }, - copilot: { vscodeVersion: "1.110.0", chatVersion: "0.38.0", userAgent: "GitHubCopilotChat/0.38.0", apiVersion: "2025-04-01" }, - usage: { url: "https://api.github.com/copilot_internal/user" } }, - "oauth": { - "clientId": "Iv1.b507a08c87ecfe98", - "authorizeUrl": "https://github.com/login/oauth/authorize", - "deviceCodeUrl": "https://github.com/login/device/code", - "tokenUrl": "https://github.com/login/oauth/access_token", - "userInfoUrl": "https://api.github.com/user", - "scopes": "read:user", - "apiVersion": "2022-11-28", - "copilotTokenUrl": "https://api.github.com/copilot_internal/v2/token", - "userAgent": "GitHubCopilotChat/0.26.7", - "editorVersion": "vscode/1.85.0", - "editorPluginVersion": "copilot-chat/0.26.7" - }, - media: { - serviceKinds: ["llm", "embedding"], - embeddingConfig: { baseUrl: "https://models.github.ai/inference/embeddings", authType: "apikey", authHeader: "bearer", models: [{ id: "text-embedding-3-small", name: "Text Embedding 3 Small (GitHub)", dimensions: 1536 }, { id: "text-embedding-3-large", name: "Text Embedding 3 Large (GitHub)", dimensions: 3072 }] } - }, - "models": [ - { - "id": "gpt-3.5-turbo", - "name": "GPT-3.5 Turbo" - }, - { - "id": "gpt-4", - "name": "GPT-4" - }, - { - "id": "gpt-4o", - "name": "GPT-4o" - }, - { - "id": "gpt-4o-mini", - "name": "GPT-4o mini" - }, - { - "id": "gpt-4.1", - "name": "GPT-4.1" - }, - { - "id": "gpt-5-mini", - "name": "GPT-5 Mini" - }, - { - "id": "gpt-5.2", - "name": "GPT-5.2" - }, - { - "id": "gpt-5.2-codex", - "name": "GPT-5.2 Codex" - }, - { - "id": "gpt-5.3-codex", - "name": "GPT-5.3 Codex" - }, - { - "id": "gpt-5.4", - "name": "GPT-5.4" - }, - { - "id": "gpt-5.4-mini", - "name": "GPT-5.4 Mini" - }, - { - "id": "claude-haiku-4.5", - "name": "Claude Haiku 4.5" - }, - { - "id": "claude-opus-4.5", - "name": "Claude Opus 4.5" - }, - { - "id": "claude-sonnet-4", - "name": "Claude Sonnet 4" - }, - { - "id": "claude-sonnet-4.5", - "name": "Claude Sonnet 4.5" - }, - { - "id": "claude-sonnet-4.6", - "name": "Claude Sonnet 4.6" - }, - { - "id": "claude-opus-4.6", - "name": "Claude Opus 4.6" - }, - { - "id": "claude-opus-4.7", - "name": "Claude Opus 4.7" - }, - { - "id": "gemini-2.5-pro", - "name": "Gemini 2.5 Pro" - }, - { - "id": "gemini-3-flash-preview", - "name": "Gemini 3 Flash" - }, - { - "id": "gemini-3.1-pro-preview", - "name": "Gemini 3.1 Pro" - }, - { - "id": "grok-code-fast-1", - "name": "Grok Code Fast 1" - }, - { - "id": "oswe-vscode-prime", - "name": "Raptor Mini" - }, - { - "id": "goldeneye-free-auto", - "name": "GoldenEye" - }, - { - "id": "text-embedding-3-small", - "name": "Text Embedding 3 Small (GitHub)", - "type": "embedding" - }, - { - "id": "text-embedding-3-large", - "name": "Text Embedding 3 Large (GitHub)", - "type": "embedding" - } + models: [ + { id: "gpt-3.5-turbo", name: "GPT-3.5 Turbo" }, + { id: "gpt-4", name: "GPT-4" }, + { id: "gpt-4o", name: "GPT-4o" }, + { id: "gpt-4o-mini", name: "GPT-4o mini" }, + { id: "gpt-4.1", name: "GPT-4.1" }, + { id: "gpt-5-mini", name: "GPT-5 Mini" }, + { id: "gpt-5.2", name: "GPT-5.2" }, + { id: "gpt-5.2-codex", name: "GPT-5.2 Codex" }, + { id: "gpt-5.3-codex", name: "GPT-5.3 Codex" }, + { id: "gpt-5.4", name: "GPT-5.4" }, + { id: "gpt-5.4-mini", name: "GPT-5.4 Mini" }, + { id: "claude-haiku-4.5", name: "Claude Haiku 4.5" }, + { id: "claude-opus-4.5", name: "Claude Opus 4.5" }, + { id: "claude-sonnet-4", name: "Claude Sonnet 4" }, + { id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" }, + { id: "claude-sonnet-4.6", name: "Claude Sonnet 4.6" }, + { id: "claude-opus-4.6", name: "Claude Opus 4.6" }, + { id: "claude-opus-4.7", name: "Claude Opus 4.7" }, + { id: "gemini-2.5-pro", name: "Gemini 2.5 Pro" }, + { id: "gemini-3-flash-preview", name: "Gemini 3 Flash" }, + { id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro" }, + { id: "grok-code-fast-1", name: "Grok Code Fast 1" }, + { id: "oswe-vscode-prime", name: "Raptor Mini" }, + { id: "goldeneye-free-auto", name: "GoldenEye" }, + { id: "text-embedding-3-small", name: "Text Embedding 3 Small (GitHub)", kind: "embedding" }, + { id: "text-embedding-3-large", name: "Text Embedding 3 Large (GitHub)", kind: "embedding" }, ], - features: {"usage":true}, + serviceKinds: ["llm","embedding"], + embeddingConfig: { baseUrl: "https://models.github.ai/inference/embeddings", authType: "apikey", authHeader: "bearer" }, + oauth: { + clientId: "Iv1.b507a08c87ecfe98", + authorizeUrl: "https://github.com/login/oauth/authorize", + deviceCodeUrl: "https://github.com/login/device/code", + tokenUrl: "https://github.com/login/oauth/access_token", + userInfoUrl: "https://api.github.com/user", + scopes: "read:user", + apiVersion: "2022-11-28", + copilotTokenUrl: "https://api.github.com/copilot_internal/v2/token", + userAgent: "GitHubCopilotChat/0.26.7", + editorVersion: "vscode/1.85.0", + editorPluginVersion: "copilot-chat/0.26.7", + }, + features: { + usage: true, + }, }; diff --git a/open-sse/providers/registry/gitlab.js b/open-sse/providers/registry/gitlab.js index 278766e7..65d604d3 100644 --- a/open-sse/providers/registry/gitlab.js +++ b/open-sse/providers/registry/gitlab.js @@ -1,17 +1,30 @@ - export default { - "id": "gitlab", display: { name: "GitLab Duo", icon: "code", color: "#FC6D26", textIcon: "GL", website: "https://gitlab.com", notice: { signupUrl: "https://gitlab.com" } }, - category: "oauth", - "transport": { - "baseUrl": "https://gitlab.com/api/v4/chat/completions", - auth: {"combined":true,"header":"Authorization","scheme":"bearer"}, + id: "gitlab", + display: { + name: "GitLab Duo", + icon: "code", + color: "#FC6D26", + textIcon: "GL", + website: "https://gitlab.com", + notice: { + signupUrl: "https://gitlab.com", + }, + }, + category: "oauth", + transport: { + baseUrl: "https://gitlab.com/api/v4/chat/completions", + auth: { + combined: true, + header: "Authorization", + scheme: "bearer", + }, + }, + oauth: { + defaultBaseUrl: "https://gitlab.com", + authorizeUrlPath: "/oauth/authorize", + tokenUrlPath: "/oauth/token", + userInfoUrlPath: "/api/v4/user", + scope: "api read_user", + codeChallengeMethod: "S256", }, - "oauth": { - "defaultBaseUrl": "https://gitlab.com", - "authorizeUrlPath": "/oauth/authorize", - "tokenUrlPath": "/oauth/token", - "userInfoUrlPath": "/api/v4/user", - "scope": "api read_user", - "codeChallengeMethod": "S256" - } }; diff --git a/open-sse/providers/registry/glm-cn.js b/open-sse/providers/registry/glm-cn.js index e03c9909..5e8d8c2e 100644 --- a/open-sse/providers/registry/glm-cn.js +++ b/open-sse/providers/registry/glm-cn.js @@ -1,44 +1,33 @@ - export default { - "id": "glm-cn", - "alias": "glm-cn", + id: "glm-cn", + alias: "glm-cn", display: { - "name": "GLM (China)", - "icon": "code", - "color": "#DC2626", - "textIcon": "GC", - "website": "https://open.bigmodel.cn", - "notice": { - "apiKeyUrl": "https://open.bigmodel.cn/usercenter/apikeys" - } + name: "GLM (China)", + icon: "code", + color: "#DC2626", + textIcon: "GC", + website: "https://open.bigmodel.cn", + notice: { + apiKeyUrl: "https://open.bigmodel.cn/usercenter/apikeys", + }, }, category: "apikey", - "transport": { - "baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4/chat/completions", - "headers": {}, - usage: { url: "https://open.bigmodel.cn/api/monitor/usage/quota/limit" } + transport: { + baseUrl: "https://open.bigmodel.cn/api/coding/paas/v4/chat/completions", + headers: {}, + usage: { + url: "https://open.bigmodel.cn/api/monitor/usage/quota/limit", + }, }, - "models": [ - { - "id": "glm-5.1", - "name": "GLM 5.1" - }, - { - "id": "glm-5", - "name": "GLM 5" - }, - { - "id": "glm-4.7", - "name": "GLM-4.7" - }, - { - "id": "glm-4.6", - "name": "GLM-4.6" - }, - { - "id": "glm-4.5-air", - "name": "GLM-4.5-Air" - } + models: [ + { id: "glm-5.1", name: "GLM 5.1" }, + { id: "glm-5", name: "GLM 5" }, + { id: "glm-4.7", name: "GLM-4.7" }, + { id: "glm-4.6", name: "GLM-4.6" }, + { id: "glm-4.5-air", name: "GLM-4.5-Air" }, ], - features: {"usage":true,"usageApikey":true}, + features: { + usage: true, + usageApikey: true, + }, }; diff --git a/open-sse/providers/registry/glm.js b/open-sse/providers/registry/glm.js index c6953cd2..2db148af 100644 --- a/open-sse/providers/registry/glm.js +++ b/open-sse/providers/registry/glm.js @@ -4,29 +4,41 @@ export default { id: "glm", alias: "glm", display: { - "name": "GLM Coding", - "icon": "code", - "color": "#2563EB", - "textIcon": "GL", - "website": "https://open.bigmodel.cn", - "notice": { - "apiKeyUrl": "https://open.bigmodel.cn/usercenter/apikeys" - } + name: "GLM Coding", + icon: "code", + color: "#2563EB", + textIcon: "GL", + website: "https://open.bigmodel.cn", + notice: { + apiKeyUrl: "https://open.bigmodel.cn/usercenter/apikeys", + }, }, category: "apikey", transport: { baseUrl: "https://api.z.ai/api/anthropic/v1/messages", format: "claude", urlSuffix: "?beta=true", - headers: { ...CLAUDE_API_HEADERS }, - auth: { "combined": true, "header": "x-api-key", "scheme": "raw" }, - usage: { url: "https://api.z.ai/api/monitor/usage/quota/limit" }, + headers: { + "Anthropic-Version": "2023-06-01", + "Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14", + }, + auth: { + combined: true, + header: "x-api-key", + scheme: "raw", + }, + usage: { + url: "https://api.z.ai/api/monitor/usage/quota/limit", + }, }, models: [ { id: "glm-5.1", name: "GLM 5.1" }, { id: "glm-5", name: "GLM 5" }, { id: "glm-4.7", name: "GLM 4.7" }, - { id: "glm-4.6v", name: "GLM 4.6V (Vision)" } + { id: "glm-4.6v", name: "GLM 4.6V (Vision)" }, ], - features: { "usage": true, "usageApikey": true }, + features: { + usage: true, + usageApikey: true, + }, }; diff --git a/open-sse/providers/registry/grok-web.js b/open-sse/providers/registry/grok-web.js index b9a0e61c..6f61d6fa 100644 --- a/open-sse/providers/registry/grok-web.js +++ b/open-sse/providers/registry/grok-web.js @@ -1,73 +1,38 @@ - export default { - "id": "grok-web", - "alias": "grok-web", + id: "grok-web", + alias: "grok-web", + aliases: [ + "gw", + ], + uiAlias: "gw", display: { - "name": "Grok Web (Subscription)", - "icon": "auto_awesome", - "color": "#1DA1F2", - "textIcon": "GW", - "website": "https://grok.com" + name: "Grok Web (Subscription)", + icon: "auto_awesome", + color: "#1DA1F2", + textIcon: "GW", + website: "https://grok.com", }, category: "webCookie", - uiAlias: "gw", authType: "cookie", authHint: "Paste your sso= cookie value from grok.com", - passthroughModels: true, - aliases: ["gw"], - "transport": { - "baseUrl": "https://grok.com/rest/app-chat/conversations/new", - "format": "grok-web", - "authType": "cookie" + transport: { + baseUrl: "https://grok.com/rest/app-chat/conversations/new", + format: "grok-web", + authType: "cookie", }, - "models": [ - { - "id": "grok-3", - "name": "Grok 3" - }, - { - "id": "grok-3-mini", - "name": "Grok 3 Mini (Thinking)" - }, - { - "id": "grok-3-thinking", - "name": "Grok 3 Thinking" - }, - { - "id": "grok-4", - "name": "Grok 4" - }, - { - "id": "grok-4-mini", - "name": "Grok 4 Mini (Thinking)" - }, - { - "id": "grok-4-thinking", - "name": "Grok 4 Thinking" - }, - { - "id": "grok-4-heavy", - "name": "Grok 4 Heavy (SuperGrok)" - }, - { - "id": "grok-4.1-mini", - "name": "Grok 4.1 Mini (Thinking)" - }, - { - "id": "grok-4.1-fast", - "name": "Grok 4.1 Fast" - }, - { - "id": "grok-4.1-expert", - "name": "Grok 4.1 Expert" - }, - { - "id": "grok-4.1-thinking", - "name": "Grok 4.1 Thinking" - }, - { - "id": "grok-4.2", - "name": "Grok 4.2 (4.20 Beta)" - } - ] + models: [ + { id: "grok-3", name: "Grok 3" }, + { id: "grok-3-mini", name: "Grok 3 Mini (Thinking)" }, + { id: "grok-3-thinking", name: "Grok 3 Thinking" }, + { id: "grok-4", name: "Grok 4" }, + { id: "grok-4-mini", name: "Grok 4 Mini (Thinking)" }, + { id: "grok-4-thinking", name: "Grok 4 Thinking" }, + { id: "grok-4-heavy", name: "Grok 4 Heavy (SuperGrok)" }, + { id: "grok-4.1-mini", name: "Grok 4.1 Mini (Thinking)" }, + { id: "grok-4.1-fast", name: "Grok 4.1 Fast" }, + { id: "grok-4.1-expert", name: "Grok 4.1 Expert" }, + { id: "grok-4.1-thinking", name: "Grok 4.1 Thinking" }, + { id: "grok-4.2", name: "Grok 4.2 (4.20 Beta)" }, + ], + passthroughModels: true, }; diff --git a/open-sse/providers/registry/groq.js b/open-sse/providers/registry/groq.js index 3edaa3ed..223b341a 100644 --- a/open-sse/providers/registry/groq.js +++ b/open-sse/providers/registry/groq.js @@ -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" - ] - } - ] }; diff --git a/open-sse/providers/registry/huggingface.js b/open-sse/providers/registry/huggingface.js index 9b812cdb..9e232699 100644 --- a/open-sse/providers/registry/huggingface.js +++ b/open-sse/providers/registry/huggingface.js @@ -1,54 +1,31 @@ - export default { - "id": "huggingface", - "alias": "huggingface", + id: "huggingface", + alias: "huggingface", + aliases: [ + "hf", + ], + uiAlias: "hf", display: { - "name": "HuggingFace", - "icon": "face", - "color": "#FFD21E", - "textIcon": "HF", - "website": "https://huggingface.co", - "notice": { - "apiKeyUrl": "https://huggingface.co/settings/tokens" - } + name: "HuggingFace", + icon: "face", + color: "#FFD21E", + textIcon: "HF", + website: "https://huggingface.co", + notice: { + apiKeyUrl: "https://huggingface.co/settings/tokens", + }, }, category: "apikey", - uiAlias: "hf", authType: "apikey", - hiddenKinds: ["tts"], - aliases: ["hf"], - "transport": null, - media: { - imageConfig: { baseUrl: "https://api-inference.huggingface.co/models" } - }, - "models": [ - { - "id": "black-forest-labs/FLUX.1-schnell", - "name": "FLUX.1 Schnell", - "type": "image", - "params": [] - }, - { - "id": "stabilityai/stable-diffusion-xl-base-1.0", - "name": "SDXL Base 1.0", - "type": "image", - "params": [] - }, - { - "id": "openai/whisper-large-v3", - "name": "Whisper Large v3 (HF)", - "type": "stt", - "params": [ - "language" - ] - }, - { - "id": "openai/whisper-small", - "name": "Whisper Small (HF)", - "type": "stt", - "params": [ - "language" - ] - } - ] + hiddenKinds: [ + "tts", + ], + transport: null, + models: [ + { id: "black-forest-labs/FLUX.1-schnell", name: "FLUX.1 Schnell", params: [], kind: "image" }, + { id: "stabilityai/stable-diffusion-xl-base-1.0", name: "SDXL Base 1.0", params: [], kind: "image" }, + { id: "openai/whisper-large-v3", name: "Whisper Large v3 (HF)", params: ["language"], kind: "stt" }, + { id: "openai/whisper-small", name: "Whisper Small (HF)", params: ["language"], kind: "stt" }, + ], + imageConfig: { baseUrl: "https://api-inference.huggingface.co/models" }, }; diff --git a/open-sse/providers/registry/hyperbolic.js b/open-sse/providers/registry/hyperbolic.js index 5617b78e..dcd1e990 100644 --- a/open-sse/providers/registry/hyperbolic.js +++ b/open-sse/providers/registry/hyperbolic.js @@ -1,57 +1,34 @@ - export default { - "id": "hyperbolic", - "alias": "hyperbolic", + id: "hyperbolic", + alias: "hyperbolic", + aliases: [ + "hyp", + ], + uiAlias: "hyp", display: { - "name": "Hyperbolic", - "icon": "bolt", - "color": "#00D4FF", - "textIcon": "HY", - "website": "https://hyperbolic.xyz", - "notice": { - "apiKeyUrl": "https://app.hyperbolic.xyz/settings" - } + name: "Hyperbolic", + icon: "bolt", + color: "#00D4FF", + textIcon: "HY", + website: "https://hyperbolic.xyz", + notice: { + apiKeyUrl: "https://app.hyperbolic.xyz/settings", + }, }, category: "apikey", - uiAlias: "hyp", authType: "apikey", - aliases: ["hyp"], - "transport": { - "baseUrl": "https://api.hyperbolic.xyz/v1/chat/completions", - "validateUrl": "https://api.hyperbolic.xyz/v1/models" + transport: { + baseUrl: "https://api.hyperbolic.xyz/v1/chat/completions", + validateUrl: "https://api.hyperbolic.xyz/v1/models", }, - "models": [ - { - "id": "Qwen/QwQ-32B", - "name": "QwQ 32B" - }, - { - "id": "deepseek-ai/DeepSeek-R1", - "name": "DeepSeek R1" - }, - { - "id": "deepseek-ai/DeepSeek-V3", - "name": "DeepSeek V3" - }, - { - "id": "meta-llama/Llama-3.3-70B-Instruct", - "name": "Llama 3.3 70B" - }, - { - "id": "meta-llama/Llama-3.2-3B-Instruct", - "name": "Llama 3.2 3B" - }, - { - "id": "Qwen/Qwen2.5-72B-Instruct", - "name": "Qwen 2.5 72B" - }, - { - "id": "Qwen/Qwen2.5-Coder-32B-Instruct", - "name": "Qwen 2.5 Coder 32B" - }, - { - "id": "NousResearch/Hermes-3-Llama-3.1-70B", - "name": "Hermes 3 70B" - } - ] + models: [ + { id: "Qwen/QwQ-32B", name: "QwQ 32B" }, + { id: "deepseek-ai/DeepSeek-R1", name: "DeepSeek R1" }, + { id: "deepseek-ai/DeepSeek-V3", name: "DeepSeek V3" }, + { id: "meta-llama/Llama-3.3-70B-Instruct", name: "Llama 3.3 70B" }, + { id: "meta-llama/Llama-3.2-3B-Instruct", name: "Llama 3.2 3B" }, + { id: "Qwen/Qwen2.5-72B-Instruct", name: "Qwen 2.5 72B" }, + { id: "Qwen/Qwen2.5-Coder-32B-Instruct", name: "Qwen 2.5 Coder 32B" }, + { id: "NousResearch/Hermes-3-Llama-3.1-70B", name: "Hermes 3 70B" }, + ], }; diff --git a/open-sse/providers/registry/iflow.js b/open-sse/providers/registry/iflow.js index 27b32a6a..aee63928 100644 --- a/open-sse/providers/registry/iflow.js +++ b/open-sse/providers/registry/iflow.js @@ -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" - } - ] }; diff --git a/open-sse/providers/registry/kilocode.js b/open-sse/providers/registry/kilocode.js index 37425755..69d81b7b 100644 --- a/open-sse/providers/registry/kilocode.js +++ b/open-sse/providers/registry/kilocode.js @@ -1,61 +1,43 @@ - export default { - "id": "kilocode", - "alias": "kc", + id: "kilocode", + alias: "kc", + uiAlias: "kc", display: { - "name": "Kilo Code", - "icon": "code", - "color": "#FF6B35", - "textIcon": "KC", - "website": "https://kilocode.ai", - "notice": { - "signupUrl": "https://kilocode.ai" - } + name: "Kilo Code", + icon: "code", + color: "#FF6B35", + textIcon: "KC", + website: "https://kilocode.ai", + notice: { + signupUrl: "https://kilocode.ai", + }, }, category: "oauth", - uiAlias: "kc", - "transport": { - "baseUrl": "https://api.kilo.ai/api/openrouter/chat/completions", - "headers": {}, - auth: {"combined":true,"header":"Authorization","scheme":"bearer","hooks":["kilocodeOrg"]}, + transport: { + baseUrl: "https://api.kilo.ai/api/openrouter/chat/completions", + headers: {}, + auth: { + combined: true, + header: "Authorization", + scheme: "bearer", + hooks: [ + "kilocodeOrg", + ], + }, }, - "oauth": { - "apiBaseUrl": "https://api.kilo.ai", - "initiateUrl": "https://api.kilo.ai/api/device-auth/codes", - "pollUrlBase": "https://api.kilo.ai/api/device-auth/codes" - }, - "models": [ - { - "id": "anthropic/claude-sonnet-4-20250514", - "name": "Claude Sonnet 4" - }, - { - "id": "anthropic/claude-opus-4-20250514", - "name": "Claude Opus 4" - }, - { - "id": "google/gemini-2.5-pro", - "name": "Gemini 2.5 Pro" - }, - { - "id": "google/gemini-2.5-flash", - "name": "Gemini 2.5 Flash" - }, - { - "id": "openai/gpt-4.1", - "name": "GPT-4.1" - }, - { - "id": "openai/o3", - "name": "o3" - }, - { - "id": "deepseek/deepseek-chat", - "name": "DeepSeek Chat" - }, - { - "id": "deepseek/deepseek-reasoner", - "name": "DeepSeek Reasoner" - } + models: [ + { id: "anthropic/claude-sonnet-4-20250514", name: "Claude Sonnet 4" }, + { id: "anthropic/claude-opus-4-20250514", name: "Claude Opus 4" }, + { id: "google/gemini-2.5-pro", name: "Gemini 2.5 Pro" }, + { id: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash" }, + { id: "openai/gpt-4.1", name: "GPT-4.1" }, + { id: "openai/o3", name: "o3" }, + { id: "deepseek/deepseek-chat", name: "DeepSeek Chat" }, + { id: "deepseek/deepseek-reasoner", name: "DeepSeek Reasoner" }, ], + oauth: { + apiBaseUrl: "https://api.kilo.ai", + initiateUrl: "https://api.kilo.ai/api/device-auth/codes", + pollUrlBase: "https://api.kilo.ai/api/device-auth/codes", + }, }; diff --git a/open-sse/providers/registry/kimi-coding.js b/open-sse/providers/registry/kimi-coding.js index 42e10d5a..6903a470 100644 --- a/open-sse/providers/registry/kimi-coding.js +++ b/open-sse/providers/registry/kimi-coding.js @@ -3,29 +3,49 @@ import { CLAUDE_API_HEADERS, KIMI_CODING_BASE_URL } from "../shared.js"; export default { id: "kimi-coding", alias: "kmc", - display: { name: "Kimi Coding", icon: "psychology", color: "#1E40AF", textIcon: "KC", website: "https://kimi.moonshot.cn", notice: { signupUrl: "https://kimi.moonshot.cn" } }, + display: { + name: "Kimi Coding", + icon: "psychology", + color: "#1E40AF", + textIcon: "KC", + website: "https://kimi.moonshot.cn", + notice: { + signupUrl: "https://kimi.moonshot.cn", + }, + }, category: "oauth", transport: { - baseUrl: KIMI_CODING_BASE_URL, + baseUrl: "https://api.kimi.com/coding/v1/messages", format: "claude", urlSuffix: "?beta=true", - headers: { ...CLAUDE_API_HEADERS }, + headers: { + "Anthropic-Version": "2023-06-01", + "Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14", + }, clientId: "17e5f671-d194-4dfb-9706-5516cb48c098", tokenUrl: "https://auth.kimi.com/api/oauth/token", refreshUrl: "https://auth.kimi.com/api/oauth/token", - auth: {"combined":true,"header":"x-api-key","scheme":"raw","hooks":["kimiHeaders"]}, - }, - oauth: { - deviceCodeUrl: "https://auth.kimi.com/api/oauth/device_authorization", - tokenUrl: "https://auth.kimi.com/api/oauth/token" - , - refreshLeadMs: 300000 + auth: { + combined: true, + header: "x-api-key", + scheme: "raw", + hooks: [ + "kimiHeaders", + ], + }, }, models: [ { id: "kimi-k2.6", name: "Kimi K2.6" }, { id: "kimi-k2.5", name: "Kimi K2.5" }, { id: "kimi-k2.5-thinking", name: "Kimi K2.5 Thinking" }, - { id: "kimi-latest", name: "Kimi Latest" } + { id: "kimi-latest", name: "Kimi Latest" }, ], - features: {"usage":true}, + oauth: { + deviceCodeUrl: "https://auth.kimi.com/api/oauth/device_authorization", + tokenUrl: "https://auth.kimi.com/api/oauth/token", + refreshLeadMs: 300000, + }, + features: { + usage: true, + }, }; diff --git a/open-sse/providers/registry/kimi.js b/open-sse/providers/registry/kimi.js index 8c43d34c..f1105ae3 100644 --- a/open-sse/providers/registry/kimi.js +++ b/open-sse/providers/registry/kimi.js @@ -4,31 +4,40 @@ export default { id: "kimi", alias: "kimi", display: { - "name": "Kimi", - "icon": "psychology", - "color": "#1E3A8A", - "textIcon": "KM", - "website": "https://kimi.moonshot.cn", - "notice": { - "apiKeyUrl": "https://platform.moonshot.ai/console/api-keys" - } + name: "Kimi", + icon: "psychology", + color: "#1E3A8A", + textIcon: "KM", + website: "https://kimi.moonshot.cn", + notice: { + apiKeyUrl: "https://platform.moonshot.ai/console/api-keys", + }, }, category: "apikey", transport: { - baseUrl: KIMI_CODING_BASE_URL, + baseUrl: "https://api.kimi.com/coding/v1/messages", format: "claude", urlSuffix: "?beta=true", - headers: { ...CLAUDE_API_HEADERS }, - auth: {"combined":true,"header":"x-api-key","scheme":"raw"}, - }, - media: { - serviceKinds: ["llm", "webSearch"], - searchViaChat: { defaultModel: "kimi-k2.5", endpoint: "https://api.moonshot.cn/v1/chat/completions", pricingUrl: "https://platform.moonshot.ai/docs/pricing/chat" } + headers: { + "Anthropic-Version": "2023-06-01", + "Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14", + }, + auth: { + combined: true, + header: "x-api-key", + scheme: "raw", + }, }, models: [ { id: "kimi-k2.6", name: "Kimi K2.6" }, { id: "kimi-k2.5", name: "Kimi K2.5" }, { id: "kimi-k2.5-thinking", name: "Kimi K2.5 Thinking" }, - { id: "kimi-latest", name: "Kimi Latest" } + { id: "kimi-latest", name: "Kimi Latest" }, ], + serviceKinds: ["llm","webSearch"], + searchViaChat: { + defaultModel: "kimi-k2.5", + endpoint: "https://api.moonshot.cn/v1/chat/completions", + pricingUrl: "https://platform.moonshot.ai/docs/pricing/chat", + }, }; diff --git a/open-sse/providers/registry/kiro.js b/open-sse/providers/registry/kiro.js index fbbebe84..50c1384f 100644 --- a/open-sse/providers/registry/kiro.js +++ b/open-sse/providers/registry/kiro.js @@ -1,120 +1,90 @@ - export default { - "id": "kiro", - "alias": "kr", + id: "kiro", + alias: "kr", + uiAlias: "kr", display: { - "name": "Kiro AI", - "icon": "psychology_alt", - "color": "#FF6B35", - "website": "https://kiro.dev", - "notice": { - "signupUrl": "https://kiro.dev" - }, - "deprecated": true, - "deprecationNotice": "RISK_NOTICE" + name: "Kiro AI", + icon: "psychology_alt", + color: "#FF6B35", + website: "https://kiro.dev", + notice: { + signupUrl: "https://kiro.dev", + }, + deprecated: true, + deprecationNotice: "RISK_NOTICE", }, category: "free", - uiAlias: "kr", - "transport": { - "baseUrl": "https://runtime.us-east-1.kiro.dev/generateAssistantResponse", - "baseUrls": [ + transport: { + baseUrl: "https://runtime.us-east-1.kiro.dev/generateAssistantResponse", + baseUrls: [ "https://runtime.us-east-1.kiro.dev/generateAssistantResponse", "https://codewhisperer.us-east-1.amazonaws.com/generateAssistantResponse", - "https://q.us-east-1.amazonaws.com/generateAssistantResponse" + "https://q.us-east-1.amazonaws.com/generateAssistantResponse", ], - "format": "kiro", - "retry": { - "429": 0 + format: "kiro", + retry: { + "429": 0, }, - "headers": { + headers: { "Content-Type": "application/json", - "Accept": "application/vnd.amazon.eventstream", + Accept: "application/vnd.amazon.eventstream", "X-Amz-Target": "AmazonCodeWhispererStreamingService.GenerateAssistantResponse", "User-Agent": "AWS-SDK-JS/3.0.0 kiro-ide/1.0.0", - "X-Amz-User-Agent": "aws-sdk-js/3.0.0 kiro-ide/1.0.0" + "X-Amz-User-Agent": "aws-sdk-js/3.0.0 kiro-ide/1.0.0", }, - "tokenUrl": "https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken", - "authUrl": "https://prod.us-east-1.auth.desktop.kiro.dev", + tokenUrl: "https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken", + authUrl: "https://prod.us-east-1.auth.desktop.kiro.dev", usage: { cwHost: "https://codewhisperer.us-east-1.amazonaws.com", qHost: "https://q.us-east-1.amazonaws.com", - limitsPath: "/getUsageLimits" - } + limitsPath: "/getUsageLimits", + }, }, - "oauth": { - "ssoOidcEndpoint": "https://oidc.us-east-1.amazonaws.com", - "registerClientUrl": "https://oidc.us-east-1.amazonaws.com/client/register", - "deviceAuthUrl": "https://oidc.us-east-1.amazonaws.com/device_authorization", - "tokenUrl": "https://oidc.us-east-1.amazonaws.com/token", - "startUrl": "https://view.awsapps.com/start", - "clientName": "kiro-oauth-client", - "clientType": "public", - "scopes": ["codewhisperer:completions", "codewhisperer:analysis", "codewhisperer:conversations"], - "grantTypes": ["urn:ietf:params:oauth:grant-type:device_code", "refresh_token"], - "issuerUrl": "https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6", - "socialAuthEndpoint": "https://prod.us-east-1.auth.desktop.kiro.dev", - "socialLoginUrl": "https://prod.us-east-1.auth.desktop.kiro.dev/login", - "socialTokenUrl": "https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token", - "socialRefreshUrl": "https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken", - "authMethods": ["builder-id", "idc", "google", "github", "import"] - }, - "models": [ - { - "id": "claude-sonnet-4.5", - "name": "Claude Sonnet 4.5" - }, - { - "id": "claude-haiku-4.5", - "name": "Claude Haiku 4.5" - }, - { - "id": "deepseek-3.2", - "name": "DeepSeek 3.2", - "strip": [ - "image", - "audio" - ] - }, - { - "id": "qwen3-coder-next", - "name": "Qwen3 Coder Next", - "strip": [ - "image", - "audio" - ] - }, - { - "id": "glm-5", - "name": "GLM 5" - }, - { - "id": "MiniMax-M2.5", - "name": "MiniMax M2.5" - }, - { - "id": "claude-sonnet-4.5-thinking", - "name": "Claude Sonnet 4.5 (Thinking)" - }, - { - "id": "claude-haiku-4.5-thinking", - "name": "Claude Haiku 4.5 (Thinking)" - }, - { - "id": "claude-sonnet-4.5-agentic", - "name": "Claude Sonnet 4.5 (Agentic)" - }, - { - "id": "claude-haiku-4.5-agentic", - "name": "Claude Haiku 4.5 (Agentic)" - }, - { - "id": "claude-sonnet-4.5-thinking-agentic", - "name": "Claude Sonnet 4.5 (Thinking + Agentic)" - }, - { - "id": "claude-haiku-4.5-thinking-agentic", - "name": "Claude Haiku 4.5 (Thinking + Agentic)" - } + models: [ + { id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" }, + { id: "claude-haiku-4.5", name: "Claude Haiku 4.5" }, + { id: "deepseek-3.2", name: "DeepSeek 3.2", strip: ["image","audio"] }, + { id: "qwen3-coder-next", name: "Qwen3 Coder Next", strip: ["image","audio"] }, + { id: "glm-5", name: "GLM 5" }, + { id: "MiniMax-M2.5", name: "MiniMax M2.5" }, + { id: "claude-sonnet-4.5-thinking", name: "Claude Sonnet 4.5 (Thinking)" }, + { id: "claude-haiku-4.5-thinking", name: "Claude Haiku 4.5 (Thinking)" }, + { id: "claude-sonnet-4.5-agentic", name: "Claude Sonnet 4.5 (Agentic)" }, + { id: "claude-haiku-4.5-agentic", name: "Claude Haiku 4.5 (Agentic)" }, + { id: "claude-sonnet-4.5-thinking-agentic", name: "Claude Sonnet 4.5 (Thinking + Agentic)" }, + { id: "claude-haiku-4.5-thinking-agentic", name: "Claude Haiku 4.5 (Thinking + Agentic)" }, ], - features: {"usage":true}, + oauth: { + ssoOidcEndpoint: "https://oidc.us-east-1.amazonaws.com", + registerClientUrl: "https://oidc.us-east-1.amazonaws.com/client/register", + deviceAuthUrl: "https://oidc.us-east-1.amazonaws.com/device_authorization", + tokenUrl: "https://oidc.us-east-1.amazonaws.com/token", + startUrl: "https://view.awsapps.com/start", + clientName: "kiro-oauth-client", + clientType: "public", + scopes: [ + "codewhisperer:completions", + "codewhisperer:analysis", + "codewhisperer:conversations", + ], + grantTypes: [ + "urn:ietf:params:oauth:grant-type:device_code", + "refresh_token", + ], + issuerUrl: "https://identitycenter.amazonaws.com/ssoins-722374e8c3c8e6c6", + socialAuthEndpoint: "https://prod.us-east-1.auth.desktop.kiro.dev", + socialLoginUrl: "https://prod.us-east-1.auth.desktop.kiro.dev/login", + socialTokenUrl: "https://prod.us-east-1.auth.desktop.kiro.dev/oauth/token", + socialRefreshUrl: "https://prod.us-east-1.auth.desktop.kiro.dev/refreshToken", + authMethods: [ + "builder-id", + "idc", + "google", + "github", + "import", + ], + }, + features: { + usage: true, + }, }; diff --git a/open-sse/providers/registry/migrate-registry.mjs b/open-sse/providers/registry/migrate-registry.mjs new file mode 100644 index 00000000..ba1d0e48 --- /dev/null +++ b/open-sse/providers/registry/migrate-registry.mjs @@ -0,0 +1,271 @@ +/** + * migrate-registry.mjs + * Migrates all registry files to Model-A schema: + * - models[] = ALL models (chat + media), field `kind` (default "llm") + * - media wrapper removed → fields promoted top-level + * - *Config.models removed (data merged into models[]) + * - format: terse, consistent indent + * + * Run: node --experimental-vm-modules migrate-registry.mjs [--dry] + */ +import { readFileSync, writeFileSync, readdirSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { dirname, join } from "node:path"; +import { createRequire } from "node:module"; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const REGISTRY_DIR = __dirname; // script lives in registry/ +const DRY = process.argv.includes("--dry"); + +// *Config.models field → kind value +const CFG_KIND = { + ttsConfig: "tts", + sttConfig: "stt", + embeddingConfig: "embedding", + imageConfig: "image", + imageToTextConfig: "imageToText", + videoConfig: "video", + musicConfig: "music", +}; + +// Fields in *Config that are NOT models (keep on config) +const MODEL_ONLY_KEY = "models"; + +// Top-level registry fields that are NOT media-config (don't flatten these from media) +// serviceKinds + *Config + searchViaChat + mediaConfig + passthroughModels are media fields +// Everything else is already top-level +const MEDIA_WHITELIST = new Set([ + "serviceKinds", + "ttsConfig", "sttConfig", "embeddingConfig", + "imageConfig", "imageToTextConfig", "videoConfig", "musicConfig", + "searchViaChat", "searchConfig", "fetchConfig", + "modelsFetcher", "hasProviderSpecificData", "passthroughModels", + "mediaPriority", "hiddenKinds", +]); + +function migrateEntry(entry, filename) { + const out = {}; + + // 1. Top-level identity/transport fields (preserve order) + const TRANSPORT_KEYS = ["id", "alias", "aliases", "uiAlias", "display", "category", + "authType", "authHint", "authModes", "hasOAuth", "noAuth", + "hasProviderSpecificData", "thinkingConfig", "hiddenKinds", + "regions", "defaultRegion", "passthroughModels", "transport"]; + for (const k of TRANSPORT_KEYS) { + if (entry[k] !== undefined) out[k] = entry[k]; + } + + // 2. Collect existing models[] (convert type→kind, skip if kind already set) + const existingModels = (entry.models || []).map(m => { + const { type, ...rest } = m; + const kind = m.kind ?? (type && type !== "llm" ? type : undefined); + return kind ? { ...rest, kind } : rest; + }); + const existingIds = new Set(existingModels.map(m => m.id)); + + // 3. Extract models from *Config.models (merge into models[]) + const mediaModels = []; + const media = entry.media || {}; + for (const [cfgKey, kind] of Object.entries(CFG_KIND)) { + const cfg = media[cfgKey]; + if (!cfg?.models) continue; + for (const m of cfg.models) { + // Check if same id+kind combo already exists to avoid true duplicates + const dup = existingModels.find(x => x.id === m.id && (x.kind ?? "llm") === kind); + if (dup) continue; + const { ...mClean } = m; + mediaModels.push({ ...mClean, kind }); + } + } + + // 4. Merge models (existing first, then media additions) + const allModels = [...existingModels, ...mediaModels]; + // Only include models key if non-empty or explicitly defined + if (allModels.length > 0 || entry.models !== undefined) { + out.models = allModels; + } + + // 5. Flatten media fields (without .models sub-arrays) + for (const [k, v] of Object.entries(media)) { + if (!MEDIA_WHITELIST.has(k)) continue; + if (CFG_KIND[k]) { + // Strip .models from config, keep rest + const { models: _m, ...cfgRest } = (v || {}); + if (Object.keys(cfgRest).length > 0) out[k] = cfgRest; + } else { + out[k] = v; + } + } + + // 6. Other top-level fields not in TRANSPORT_KEYS and not media (e.g. features, oauth, usage in transport) + const SKIP = new Set([...TRANSPORT_KEYS, "models", "media", ...Object.keys(CFG_KIND), + "serviceKinds", "searchViaChat", "searchConfig", "fetchConfig", + "modelsFetcher", "passthroughModels", "mediaPriority"]); + for (const [k, v] of Object.entries(entry)) { + if (!SKIP.has(k)) out[k] = v; + } + + return out; +} + +// Format a registry entry as clean JS (no JSON.stringify — write proper ES module) +function formatValue(v, indent = 0) { + const pad = " ".repeat(indent); + const pad1 = " ".repeat(indent + 1); + + if (v === null || v === undefined) return String(v); + if (typeof v === "boolean" || typeof v === "number") return String(v); + if (typeof v === "string") return JSON.stringify(v); + + if (Array.isArray(v)) { + if (v.length === 0) return "[]"; + // Model arrays: 1 model per line (compact inline object) + const items = v.map(item => { + if (typeof item === "object" && item !== null && !Array.isArray(item)) { + return `${pad1}${formatInlineObject(item)}`; + } + return `${pad1}${formatValue(item, indent + 1)}`; + }); + return `[\n${items.join(",\n")},\n${pad}]`; + } + + if (typeof v === "object") { + const keys = Object.keys(v); + if (keys.length === 0) return "{}"; + const lines = keys.map(k => { + const key = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k) ? k : JSON.stringify(k); + return `${pad1}${key}: ${formatValue(v[k], indent + 1)}`; + }); + return `{\n${lines.join(",\n")},\n${pad}}`; + } + + return JSON.stringify(v); +} + +// Inline compact object: { id: "x", name: "y", kind: "tts", dimensions: 1536 } +function formatInlineObject(obj) { + const parts = Object.entries(obj).map(([k, v]) => { + const key = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k) ? k : JSON.stringify(k); + return `${key}: ${JSON.stringify(v)}`; + }); + return `{ ${parts.join(", ")} }`; +} + +// Config objects (ttsConfig etc) — inline single line if short, else multi-line +function formatConfig(cfg) { + const line = `{ ${Object.entries(cfg).map(([k,v])=>`${k}: ${JSON.stringify(v)}`).join(", ")} }`; + if (line.length <= 120) return line; + const pad1 = " ".repeat(2); + const lines = Object.entries(cfg).map(([k,v]) => `${pad1}${k}: ${JSON.stringify(v)}`); + return `{\n${lines.join(",\n")},\n }`; +} + +// Top-level registry entry formatter +function formatEntry(entry, imports = "") { + const lines = []; + if (imports) lines.push(imports, ""); + lines.push("export default {"); + + const TOP_ORDER = [ + "id", "alias", "aliases", "uiAlias", "display", "category", + "authType", "authHint", "authModes", "hasOAuth", "noAuth", + "hasProviderSpecificData", "thinkingConfig", "hiddenKinds", + "regions", "defaultRegion", "transport", + "models", + // media fields + "serviceKinds", + "ttsConfig", "sttConfig", "embeddingConfig", + "imageConfig", "imageToTextConfig", "videoConfig", "musicConfig", + "searchViaChat", "searchConfig", "fetchConfig", "modelsFetcher", + "passthroughModels", "mediaPriority", + // other + "oauth", "features", + ]; + + const emitted = new Set(); + + function emitKey(k) { + if (!(k in entry) || emitted.has(k)) return; + emitted.add(k); + const v = entry[k]; + const key = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k) ? k : JSON.stringify(k); + + // Config objects (xConfig) — special inline format + if (CFG_KIND[k] || k === "searchViaChat" || k === "searchConfig" || k === "fetchConfig" || k === "modelsFetcher") { + lines.push(` ${key}: ${formatConfig(v)},`); + return; + } + + // models[] — terse per-line + if (k === "models" && Array.isArray(v)) { + if (v.length === 0) { lines.push(` models: [],`); return; } + lines.push(` models: [`); + for (const m of v) lines.push(` ${formatInlineObject(m)},`); + lines.push(` ],`); + return; + } + + // serviceKinds — inline array + if (k === "serviceKinds") { + lines.push(` serviceKinds: ${JSON.stringify(v)},`); + return; + } + + // display — multi-line + if (k === "display") { + lines.push(` display: ${formatValue(v, 1)},`); + return; + } + + // transport — multi-line + if (k === "transport") { + lines.push(` transport: ${formatValue(v, 1)},`); + return; + } + + // Everything else + lines.push(` ${key}: ${formatValue(v, 1)},`); + } + + for (const k of TOP_ORDER) emitKey(k); + // Emit any remaining keys not in TOP_ORDER + for (const k of Object.keys(entry)) emitKey(k); + + lines.push("};"); + return lines.join("\n") + "\n"; +} + +// --- Main --- +const files = readdirSync(REGISTRY_DIR).filter(f => f.endsWith(".js") && f !== "index.js"); +let count = 0; + +for (const file of files) { + const path = join(REGISTRY_DIR, file); + const src = readFileSync(path, "utf8"); + + // Extract import lines (for files that import shared constants) + const importLines = src.split("\n").filter(l => l.startsWith("import ")); + const importSrc = importLines.join("\n"); + + // Dynamic import to get entry + let entry; + try { + const mod = await import(`${join(REGISTRY_DIR, file)}?t=${Date.now()}`); + entry = mod.default; + } catch (e) { + console.error(`SKIP ${file}: ${e.message}`); + continue; + } + + const migrated = migrateEntry(entry, file); + const output = formatEntry(migrated, importSrc); + + if (DRY) { + console.log(`\n=== ${file} ===\n${output}`); + } else { + writeFileSync(path, output, "utf8"); + count++; + } +} + +console.log(DRY ? `[DRY] Would migrate ${files.length} files` : `✅ Migrated ${count} files`); diff --git a/open-sse/providers/registry/mimo-free.js b/open-sse/providers/registry/mimo-free.js index 4eabc244..1fa03ce1 100644 --- a/open-sse/providers/registry/mimo-free.js +++ b/open-sse/providers/registry/mimo-free.js @@ -1,30 +1,22 @@ - export default { - "id": "mimo-free", - "alias": "mmf", + id: "mimo-free", + alias: "mmf", + uiAlias: "mmf", display: { - "name": "MiMo Code Free", - "icon": "smart_toy", - "color": "#FF6900", - "textIcon": "MF" + name: "MiMo Code Free", + icon: "smart_toy", + color: "#FF6900", + textIcon: "MF", }, category: "free", - uiAlias: "mmf", noAuth: true, - passthroughModels: true, - "transport": { - "baseUrl": "https://api.xiaomimimo.com/api/free-ai/openai/chat", - "noAuth": true - }, - media: { + transport: { + baseUrl: "https://api.xiaomimimo.com/api/free-ai/openai/chat", noAuth: true, - passthroughModels: true, - modelsFetcher: { url: "https://models.dev/api.json", type: "mimo-free" } }, - "models": [ - { - "id": "mimo-auto", - "name": "MiMo Auto" - } - ] + models: [ + { id: "mimo-auto", name: "MiMo Auto" }, + ], + modelsFetcher: { url: "https://models.dev/api.json", type: "mimo-free" }, + passthroughModels: true, }; diff --git a/open-sse/providers/registry/minimax-cn.js b/open-sse/providers/registry/minimax-cn.js index 98e87688..4a9ef0cd 100644 --- a/open-sse/providers/registry/minimax-cn.js +++ b/open-sse/providers/registry/minimax-cn.js @@ -4,35 +4,60 @@ export default { id: "minimax-cn", alias: "minimax-cn", display: { - "name": "Minimax (China)", - "icon": "memory", - "color": "#DC2626", - "textIcon": "MC", - "website": "https://www.minimaxi.com", - "notice": { - "apiKeyUrl": "https://platform.minimaxi.com/user-center/basic-information/interface-key" - } + name: "Minimax (China)", + icon: "memory", + color: "#DC2626", + textIcon: "MC", + website: "https://www.minimaxi.com", + notice: { + apiKeyUrl: "https://platform.minimaxi.com/user-center/basic-information/interface-key", + }, }, category: "apikey", transport: { baseUrl: "https://api.minimaxi.com/anthropic/v1/messages", format: "claude", urlSuffix: "?beta=true", - headers: { ...CLAUDE_API_HEADERS }, - quirks: { dropOutputConfig: true }, - reasoningInject: { scope: "all" }, - auth: { "combined": true, "header": "x-api-key", "scheme": "raw" }, - usage: { urls: ["https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains", "https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains"] }, - }, - media: { - serviceKinds: ["llm", "tts"], - ttsConfig: { baseUrl: "https://api.minimaxi.com/v1/t2a_v2", authType: "apikey", authHeader: "bearer", format: "minimax-tts", models: [{ id: "speech-2.8-hd", name: "Speech 2.8 HD" }, { id: "speech-2.8-turbo", name: "Speech 2.8 Turbo" }, { id: "speech-2.6-hd", name: "Speech 2.6 HD" }, { id: "speech-2.6-turbo", name: "Speech 2.6 Turbo" }, { id: "speech-02-hd", name: "Speech 02 HD" }, { id: "speech-02-turbo", name: "Speech 02 Turbo" }, { id: "speech-01-hd", name: "Speech 01 HD" }, { id: "speech-01-turbo", name: "Speech 01 Turbo" }] } + headers: { + "Anthropic-Version": "2023-06-01", + "Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14", + }, + quirks: { + dropOutputConfig: true, + }, + reasoningInject: { + scope: "all", + }, + auth: { + combined: true, + header: "x-api-key", + scheme: "raw", + }, + usage: { + urls: [ + "https://www.minimaxi.com/v1/api/openplatform/coding_plan/remains", + "https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains", + ], + }, }, models: [ { id: "MiniMax-M3", name: "MiniMax M3", targetFormat: "claude" }, { id: "MiniMax-M2.7", name: "MiniMax M2.7" }, { id: "MiniMax-M2.5", name: "MiniMax M2.5" }, - { id: "MiniMax-M2.1", name: "MiniMax M2.1" } + { id: "MiniMax-M2.1", name: "MiniMax M2.1" }, + { id: "speech-2.8-hd", name: "Speech 2.8 HD", kind: "tts" }, + { id: "speech-2.8-turbo", name: "Speech 2.8 Turbo", kind: "tts" }, + { id: "speech-2.6-hd", name: "Speech 2.6 HD", kind: "tts" }, + { id: "speech-2.6-turbo", name: "Speech 2.6 Turbo", kind: "tts" }, + { id: "speech-02-hd", name: "Speech 02 HD", kind: "tts" }, + { id: "speech-02-turbo", name: "Speech 02 Turbo", kind: "tts" }, + { id: "speech-01-hd", name: "Speech 01 HD", kind: "tts" }, + { id: "speech-01-turbo", name: "Speech 01 Turbo", kind: "tts" }, ], - features: { "usage": true, "usageApikey": true }, + serviceKinds: ["llm","tts"], + ttsConfig: { baseUrl: "https://api.minimaxi.com/v1/t2a_v2", authType: "apikey", authHeader: "bearer", format: "minimax-tts" }, + features: { + usage: true, + usageApikey: true, + }, }; diff --git a/open-sse/providers/registry/minimax.js b/open-sse/providers/registry/minimax.js index b4ca80ba..77bc9e27 100644 --- a/open-sse/providers/registry/minimax.js +++ b/open-sse/providers/registry/minimax.js @@ -4,38 +4,67 @@ export default { id: "minimax", alias: "minimax", display: { - "name": "Minimax Coding", - "icon": "memory", - "color": "#7C3AED", - "textIcon": "MM", - "website": "https://www.minimaxi.com", - "notice": { - "apiKeyUrl": "https://platform.minimaxi.com/user-center/basic-information/interface-key" - } + name: "Minimax Coding", + icon: "memory", + color: "#7C3AED", + textIcon: "MM", + website: "https://www.minimaxi.com", + notice: { + apiKeyUrl: "https://platform.minimaxi.com/user-center/basic-information/interface-key", + }, }, category: "apikey", transport: { baseUrl: "https://api.minimax.io/anthropic/v1/messages", format: "claude", urlSuffix: "?beta=true", - headers: { ...CLAUDE_API_HEADERS }, - quirks: { dropOutputConfig: true }, - reasoningInject: { scope: "all" }, - auth: {"combined":true,"header":"x-api-key","scheme":"raw"}, - usage: { urls: ["https://www.minimax.io/v1/token_plan/remains", "https://api.minimax.io/v1/api/openplatform/coding_plan/remains"] }, - }, - media: { - serviceKinds: ["llm", "image", "imageToText", "webSearch", "tts"], - ttsConfig: { baseUrl: "https://api.minimax.io/v1/t2a_v2", authType: "apikey", authHeader: "bearer", format: "minimax-tts", models: [{ id: "speech-2.8-hd", name: "Speech 2.8 HD" }, { id: "speech-2.8-turbo", name: "Speech 2.8 Turbo" }, { id: "speech-2.6-hd", name: "Speech 2.6 HD" }, { id: "speech-2.6-turbo", name: "Speech 2.6 Turbo" }, { id: "speech-02-hd", name: "Speech 02 HD" }, { id: "speech-02-turbo", name: "Speech 02 Turbo" }, { id: "speech-01-hd", name: "Speech 01 HD" }, { id: "speech-01-turbo", name: "Speech 01 Turbo" }] }, - searchViaChat: { defaultModel: "MiniMax-M2.7", endpoint: "https://api.minimaxi.com/v1/text/chatcompletion_v2", pricingUrl: "https://www.minimaxi.com/document/price" }, - imageConfig: { baseUrl: "https://api.minimaxi.com/v1/images/generations" } + headers: { + "Anthropic-Version": "2023-06-01", + "Anthropic-Beta": "claude-code-20250219,interleaved-thinking-2025-05-14", + }, + quirks: { + dropOutputConfig: true, + }, + reasoningInject: { + scope: "all", + }, + auth: { + combined: true, + header: "x-api-key", + scheme: "raw", + }, + usage: { + urls: [ + "https://www.minimax.io/v1/token_plan/remains", + "https://api.minimax.io/v1/api/openplatform/coding_plan/remains", + ], + }, }, models: [ { id: "MiniMax-M3", name: "MiniMax M3", targetFormat: "claude" }, { id: "MiniMax-M2.7", name: "MiniMax M2.7" }, { id: "MiniMax-M2.5", name: "MiniMax M2.5" }, { id: "MiniMax-M2.1", name: "MiniMax M2.1" }, - { id: "minimax-image-01", name: "MiniMax Image 01", type: "image", params: ["n", "size", "response_format"] } + { id: "minimax-image-01", name: "MiniMax Image 01", params: ["n","size","response_format"], kind: "image" }, + { id: "speech-2.8-hd", name: "Speech 2.8 HD", kind: "tts" }, + { id: "speech-2.8-turbo", name: "Speech 2.8 Turbo", kind: "tts" }, + { id: "speech-2.6-hd", name: "Speech 2.6 HD", kind: "tts" }, + { id: "speech-2.6-turbo", name: "Speech 2.6 Turbo", kind: "tts" }, + { id: "speech-02-hd", name: "Speech 02 HD", kind: "tts" }, + { id: "speech-02-turbo", name: "Speech 02 Turbo", kind: "tts" }, + { id: "speech-01-hd", name: "Speech 01 HD", kind: "tts" }, + { id: "speech-01-turbo", name: "Speech 01 Turbo", kind: "tts" }, ], - features: {"usage":true,"usageApikey":true}, + serviceKinds: ["llm","image","imageToText","webSearch","tts"], + ttsConfig: { baseUrl: "https://api.minimax.io/v1/t2a_v2", authType: "apikey", authHeader: "bearer", format: "minimax-tts" }, + imageConfig: { baseUrl: "https://api.minimaxi.com/v1/images/generations" }, + searchViaChat: { + defaultModel: "MiniMax-M2.7", + endpoint: "https://api.minimaxi.com/v1/text/chatcompletion_v2", + pricingUrl: "https://www.minimaxi.com/document/price", + }, + features: { + usage: true, + usageApikey: true, + }, }; diff --git a/open-sse/providers/registry/mistral.js b/open-sse/providers/registry/mistral.js index b77e8532..1a4df3b2 100644 --- a/open-sse/providers/registry/mistral.js +++ b/open-sse/providers/registry/mistral.js @@ -1,43 +1,30 @@ export default { - "id": "mistral", - "alias": "mistral", + id: "mistral", + alias: "mistral", display: { - "name": "Mistral", - "icon": "air", - "color": "#FF7000", - "textIcon": "MI", - "website": "https://mistral.ai", - "notice": { - "apiKeyUrl": "https://console.mistral.ai/api-keys" - } + name: "Mistral", + icon: "air", + color: "#FF7000", + textIcon: "MI", + website: "https://mistral.ai", + notice: { + apiKeyUrl: "https://console.mistral.ai/api-keys", + }, }, category: "apikey", - "transport": { - "baseUrl": "https://api.mistral.ai/v1/chat/completions", - "validateUrl": "https://api.mistral.ai/v1/models", - "quirks": { "dropClientMetadata": true } + transport: { + baseUrl: "https://api.mistral.ai/v1/chat/completions", + validateUrl: "https://api.mistral.ai/v1/models", + quirks: { + dropClientMetadata: true, + }, }, - media: { - serviceKinds: ["llm", "imageToText", "embedding"], - embeddingConfig: { baseUrl: "https://api.mistral.ai/v1/embeddings", authType: "apikey", authHeader: "bearer", models: [{ id: "mistral-embed", name: "Mistral Embed", dimensions: 1024 }] } - }, - "models": [ - { - "id": "mistral-large-latest", - "name": "Mistral Large 3" - }, - { - "id": "codestral-latest", - "name": "Codestral" - }, - { - "id": "mistral-medium-latest", - "name": "Mistral Medium 3" - }, - { - "id": "mistral-embed", - "name": "Mistral Embed", - "type": "embedding" - } - ] + models: [ + { id: "mistral-large-latest", name: "Mistral Large 3" }, + { id: "codestral-latest", name: "Codestral" }, + { id: "mistral-medium-latest", name: "Mistral Medium 3" }, + { id: "mistral-embed", name: "Mistral Embed", kind: "embedding" }, + ], + serviceKinds: ["llm","imageToText","embedding"], + embeddingConfig: { baseUrl: "https://api.mistral.ai/v1/embeddings", authType: "apikey", authHeader: "bearer" }, }; diff --git a/open-sse/providers/registry/mmf.js b/open-sse/providers/registry/mmf.js index d115a3d2..18b5d585 100644 --- a/open-sse/providers/registry/mmf.js +++ b/open-sse/providers/registry/mmf.js @@ -1,15 +1,17 @@ - export default { - "id": "mmf", display: { name: "MMF", icon: "hub", color: "#6366F1", textIcon: "MF" }, - category: "apikey", - "transport": { - "baseUrl": "https://api.xiaomimimo.com/api/free-ai/openai/chat", - "noAuth": true + id: "mmf", + display: { + name: "MMF", + icon: "hub", + color: "#6366F1", + textIcon: "MF", }, - "models": [ - { - "id": "mimo-auto", - "name": "MiMo Auto" - } - ] + category: "apikey", + transport: { + baseUrl: "https://api.xiaomimimo.com/api/free-ai/openai/chat", + noAuth: true, + }, + models: [ + { id: "mimo-auto", name: "MiMo Auto" }, + ], }; diff --git a/open-sse/providers/registry/nanobanana.js b/open-sse/providers/registry/nanobanana.js index cd00ef85..7454a335 100644 --- a/open-sse/providers/registry/nanobanana.js +++ b/open-sse/providers/registry/nanobanana.js @@ -1,47 +1,33 @@ - export default { - "id": "nanobanana", - "alias": "nanobanana", + id: "nanobanana", + alias: "nanobanana", + aliases: [ + "nb", + ], + uiAlias: "nb", display: { - "name": "NanoBanana API", - "icon": "extension", - "color": "#FFD700", - "textIcon": "🍌", - "website": "https://nanobananaapi.ai", - "notice": { - "text": "3rd-party proxy for Google Nano Banana (Gemini 2.5/3 Flash Image). For official, use Gemini provider.", - "apiKeyUrl": "https://nanobananaapi.ai/dashboard" - } + name: "NanoBanana API", + icon: "extension", + color: "#FFD700", + textIcon: "🍌", + website: "https://nanobananaapi.ai", + notice: { + text: "3rd-party proxy for Google Nano Banana (Gemini 2.5/3 Flash Image). For official, use Gemini provider.", + apiKeyUrl: "https://nanobananaapi.ai/dashboard", + }, }, category: "apikey", - uiAlias: "nb", - aliases: ["nb"], - "transport": { - "baseUrl": "https://api.nanobananaapi.ai/v1/chat/completions", - "validateUrl": "https://api.nanobananaapi.ai/v1/models" + transport: { + baseUrl: "https://api.nanobananaapi.ai/v1/chat/completions", + validateUrl: "https://api.nanobananaapi.ai/v1/models", }, - media: { - serviceKinds: ["llm", "image"], - imageConfig: { baseUrl: "https://api.nanobananaapi.ai/api/v1/nanobanana/generate", pollUrl: "https://api.nanobananaapi.ai/api/v1/nanobanana/record-info" } + models: [ + { id: "nanobanana-flash", name: "NanoBanana Flash", params: ["n","size"], kind: "image" }, + { id: "nanobanana-pro", name: "NanoBanana Pro", params: ["n","size"], kind: "image" }, + ], + serviceKinds: ["llm","image"], + imageConfig: { + baseUrl: "https://api.nanobananaapi.ai/api/v1/nanobanana/generate", + pollUrl: "https://api.nanobananaapi.ai/api/v1/nanobanana/record-info", }, - "models": [ - { - "id": "nanobanana-flash", - "name": "NanoBanana Flash", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "nanobanana-pro", - "name": "NanoBanana Pro", - "type": "image", - "params": [ - "n", - "size" - ] - } - ] }; diff --git a/open-sse/providers/registry/nebius.js b/open-sse/providers/registry/nebius.js index df88c39f..81c0d3a3 100644 --- a/open-sse/providers/registry/nebius.js +++ b/open-sse/providers/registry/nebius.js @@ -1,35 +1,25 @@ - export default { - "id": "nebius", - "alias": "nebius", + id: "nebius", + alias: "nebius", display: { - "name": "Nebius AI", - "icon": "cloud", - "color": "#6C5CE7", - "textIcon": "NB", - "website": "https://nebius.com", - "notice": { - "apiKeyUrl": "https://studio.nebius.com/settings/api-keys" - } + name: "Nebius AI", + icon: "cloud", + color: "#6C5CE7", + textIcon: "NB", + website: "https://nebius.com", + notice: { + apiKeyUrl: "https://studio.nebius.com/settings/api-keys", + }, }, category: "apikey", authType: "apikey", - "transport": { - "baseUrl": "https://api.studio.nebius.ai/v1/chat/completions", - "validateUrl": "https://api.studio.nebius.ai/v1/models" + transport: { + baseUrl: "https://api.studio.nebius.ai/v1/chat/completions", + validateUrl: "https://api.studio.nebius.ai/v1/models", }, - media: { - embeddingConfig: { baseUrl: "https://api.tokenfactory.nebius.com/v1/embeddings" } - }, - "models": [ - { - "id": "meta-llama/Llama-3.3-70B-Instruct", - "name": "Llama 3.3 70B Instruct" - }, - { - "id": "Qwen/Qwen3-Embedding-8B", - "name": "Qwen3 Embedding 8B", - "type": "embedding" - } - ] + models: [ + { id: "meta-llama/Llama-3.3-70B-Instruct", name: "Llama 3.3 70B Instruct" }, + { id: "Qwen/Qwen3-Embedding-8B", name: "Qwen3 Embedding 8B", kind: "embedding" }, + ], + embeddingConfig: { baseUrl: "https://api.tokenfactory.nebius.com/v1/embeddings" }, }; diff --git a/open-sse/providers/registry/nvidia.js b/open-sse/providers/registry/nvidia.js index 1b7b9f17..8b7b1475 100644 --- a/open-sse/providers/registry/nvidia.js +++ b/open-sse/providers/registry/nvidia.js @@ -1,49 +1,36 @@ - export default { - "id": "nvidia", - "alias": "nvidia", + id: "nvidia", + alias: "nvidia", display: { - "name": "NVIDIA NIM", - "icon": "developer_board", - "color": "#76B900", - "textIcon": "NV", - "website": "https://developer.nvidia.com/nim", - "notice": { - "text": "Free access for NVIDIA Developer Program members (prototyping & testing).", - "apiKeyUrl": "https://build.nvidia.com/settings/api-keys" - } + name: "NVIDIA NIM", + icon: "developer_board", + color: "#76B900", + textIcon: "NV", + website: "https://developer.nvidia.com/nim", + notice: { + text: "Free access for NVIDIA Developer Program members (prototyping & testing).", + apiKeyUrl: "https://build.nvidia.com/settings/api-keys", + }, }, category: "freeTier", - "transport": { - "baseUrl": "https://integrate.api.nvidia.com/v1/chat/completions", - "validateUrl": "https://integrate.api.nvidia.com/v1/models" + transport: { + baseUrl: "https://integrate.api.nvidia.com/v1/chat/completions", + validateUrl: "https://integrate.api.nvidia.com/v1/models", }, - media: { - serviceKinds: ["llm", "tts", "embedding"], - ttsConfig: { baseUrl: "https://integrate.api.nvidia.com/v1/audio/speech", authType: "apikey", authHeader: "bearer", format: "nvidia-tts", models: [{ id: "fastpitch", name: "FastPitch" }, { id: "tacotron2", name: "Tacotron2" }] }, - embeddingConfig: { baseUrl: "https://integrate.api.nvidia.com/v1/embeddings", authType: "apikey", authHeader: "bearer", models: [{ id: "nvidia/nv-embedqa-e5-v5", name: "NV EmbedQA E5 v5", dimensions: 1024 }] } + models: [ + { id: "minimaxai/minimax-m2.7", name: "Minimax M2.7" }, + { id: "z-ai/glm4.7", name: "GLM 4.7" }, + { id: "nvidia/nv-embedqa-e5-v5", name: "NV EmbedQA E5 v5", kind: "embedding" }, + { id: "nvidia/parakeet-ctc-1.1b-asr", name: "Parakeet CTC 1.1B", params: ["language"], kind: "stt" }, + { id: "fastpitch", name: "FastPitch", kind: "tts" }, + { id: "tacotron2", name: "Tacotron2", kind: "tts" }, + ], + serviceKinds: ["llm","tts","embedding"], + ttsConfig: { + baseUrl: "https://integrate.api.nvidia.com/v1/audio/speech", + authType: "apikey", + authHeader: "bearer", + format: "nvidia-tts", }, - "models": [ - { - "id": "minimaxai/minimax-m2.7", - "name": "Minimax M2.7" - }, - { - "id": "z-ai/glm4.7", - "name": "GLM 4.7" - }, - { - "id": "nvidia/nv-embedqa-e5-v5", - "name": "NV EmbedQA E5 v5", - "type": "embedding" - }, - { - "id": "nvidia/parakeet-ctc-1.1b-asr", - "name": "Parakeet CTC 1.1B", - "type": "stt", - "params": [ - "language" - ] - } - ] + embeddingConfig: { baseUrl: "https://integrate.api.nvidia.com/v1/embeddings", authType: "apikey", authHeader: "bearer" }, }; diff --git a/open-sse/providers/registry/ollama-local.js b/open-sse/providers/registry/ollama-local.js index 82e0ce07..0364c950 100644 --- a/open-sse/providers/registry/ollama-local.js +++ b/open-sse/providers/registry/ollama-local.js @@ -1,20 +1,17 @@ - export default { - "id": "ollama-local", - "alias": "ollama-local", + id: "ollama-local", + alias: "ollama-local", display: { - "name": "Ollama Local", - "icon": "cloud", - "color": "#ffffffff", - "textIcon": "OL", - "website": "https://ollama.com" + name: "Ollama Local", + icon: "cloud", + color: "#ffffffff", + textIcon: "OL", + website: "https://ollama.com", }, category: "apikey", - "transport": { - "baseUrl": "http://localhost:11434/api/chat", - "format": "ollama" + transport: { + baseUrl: "http://localhost:11434/api/chat", + format: "ollama", }, - media: { - serviceKinds: ["llm"] - } + serviceKinds: ["llm"], }; diff --git a/open-sse/providers/registry/ollama.js b/open-sse/providers/registry/ollama.js index f881fce7..6e499592 100644 --- a/open-sse/providers/registry/ollama.js +++ b/open-sse/providers/registry/ollama.js @@ -1,52 +1,33 @@ - export default { - "id": "ollama", - "alias": "ollama", + id: "ollama", + alias: "ollama", display: { - "name": "Ollama Cloud", - "icon": "cloud", - "color": "#ffffffff", - "textIcon": "OL", - "website": "https://ollama.com", - "notice": { - "text": "Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo · Max $100/mo.", - "apiKeyUrl": "https://ollama.com/settings/keys" - } + name: "Ollama Cloud", + icon: "cloud", + color: "#ffffffff", + textIcon: "OL", + website: "https://ollama.com", + notice: { + text: "Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo · Max $100/mo.", + apiKeyUrl: "https://ollama.com/settings/keys", + }, }, category: "freeTier", - "transport": { - "baseUrl": "https://ollama.com/api/chat", - "validateUrl": "https://ollama.com/api/tags", - "format": "ollama" + transport: { + baseUrl: "https://ollama.com/api/chat", + validateUrl: "https://ollama.com/api/tags", + format: "ollama", }, - media: { - serviceKinds: ["llm"] - }, - "models": [ - { - "id": "gpt-oss:120b", - "name": "GPT OSS 120B" - }, - { - "id": "kimi-k2.5", - "name": "Kimi K2.5" - }, - { - "id": "glm-5", - "name": "GLM 5" - }, - { - "id": "minimax-m2.5", - "name": "MiniMax M2.5" - }, - { - "id": "glm-4.7-flash", - "name": "GLM 4.7 Flash" - }, - { - "id": "qwen3.5", - "name": "Qwen3.5" - } + models: [ + { id: "gpt-oss:120b", name: "GPT OSS 120B" }, + { id: "kimi-k2.5", name: "Kimi K2.5" }, + { id: "glm-5", name: "GLM 5" }, + { id: "minimax-m2.5", name: "MiniMax M2.5" }, + { id: "glm-4.7-flash", name: "GLM 4.7 Flash" }, + { id: "qwen3.5", name: "Qwen3.5" }, ], - features: {"usage":true}, + serviceKinds: ["llm"], + features: { + usage: true, + }, }; diff --git a/open-sse/providers/registry/openai.js b/open-sse/providers/registry/openai.js index 755e29dd..365103ad 100644 --- a/open-sse/providers/registry/openai.js +++ b/open-sse/providers/registry/openai.js @@ -1,205 +1,80 @@ export default { - "id": "openai", - "alias": "openai", + id: "openai", + alias: "openai", display: { - "name": "OpenAI", - "icon": "auto_awesome", - "color": "#10A37F", - "textIcon": "OA", - "website": "https://platform.openai.com", - "notice": { - "apiKeyUrl": "https://platform.openai.com/api-keys" - } + name: "OpenAI", + icon: "auto_awesome", + color: "#10A37F", + textIcon: "OA", + website: "https://platform.openai.com", + notice: { + apiKeyUrl: "https://platform.openai.com/api-keys", + }, }, category: "apikey", - thinkingConfig: {"options":["auto","none","low","medium","high"],"defaultMode":"auto"}, - "transport": { - "baseUrl": "https://api.openai.com/v1/chat/completions", - "forceStream": true + thinkingConfig: { + options: [ + "auto", + "none", + "low", + "medium", + "high", + ], + defaultMode: "auto", }, - media: { - serviceKinds: ["llm", "embedding", "tts", "stt", "image", "imageToText", "webSearch"], - ttsConfig: { baseUrl: "https://api.openai.com/v1/audio/speech", authType: "apikey", authHeader: "bearer", format: "openai", defaultModel: "gpt-4o-mini-tts", models: [{ id: "tts-1", name: "TTS-1" }, { id: "tts-1-hd", name: "TTS-1 HD" }, { id: "gpt-4o-mini-tts", name: "GPT-4o Mini TTS" }] }, - sttConfig: { baseUrl: "https://api.openai.com/v1/audio/transcriptions", authType: "apikey", authHeader: "bearer", format: "openai", models: [{ id: "whisper-1", name: "Whisper 1" }, { id: "gpt-4o-transcribe", name: "GPT-4o Transcribe" }, { id: "gpt-4o-mini-transcribe", name: "GPT-4o Mini Transcribe" }] }, - embeddingConfig: { baseUrl: "https://api.openai.com/v1/embeddings", authType: "apikey", authHeader: "bearer", models: [{ id: "text-embedding-3-small", name: "Text Embedding 3 Small", dimensions: 1536 }, { id: "text-embedding-3-large", name: "Text Embedding 3 Large", dimensions: 3072 }, { id: "text-embedding-ada-002", name: "Text Embedding Ada 002", dimensions: 1536 }] }, - imageConfig: { baseUrl: "https://api.openai.com/v1/images/generations" }, - searchViaChat: { defaultModel: "gpt-4o-mini", pricingUrl: "https://openai.com/api/pricing" } + transport: { + baseUrl: "https://api.openai.com/v1/chat/completions", + forceStream: true, }, - "models": [ - { - "id": "gpt-5.4", - "name": "GPT-5.4" - }, - { - "id": "gpt-5.4-mini", - "name": "GPT-5.4 Mini" - }, - { - "id": "gpt-5.4-nano", - "name": "GPT-5.4 Nano" - }, - { - "id": "gpt-5.2", - "name": "GPT-5.2" - }, - { - "id": "gpt-5.1", - "name": "GPT-5.1" - }, - { - "id": "gpt-5", - "name": "GPT-5" - }, - { - "id": "gpt-5-mini", - "name": "GPT-5 Mini" - }, - { - "id": "gpt-5-nano", - "name": "GPT-5 Nano" - }, - { - "id": "gpt-4o", - "name": "GPT-4o" - }, - { - "id": "gpt-4o-mini", - "name": "GPT-4o Mini" - }, - { - "id": "gpt-4-turbo", - "name": "GPT-4 Turbo" - }, - { - "id": "gpt-4.1", - "name": "GPT-4.1" - }, - { - "id": "gpt-4.1-mini", - "name": "GPT-4.1 Mini" - }, - { - "id": "gpt-4.1-nano", - "name": "GPT-4.1 Nano" - }, - { - "id": "o3", - "name": "O3" - }, - { - "id": "o3-mini", - "name": "O3 Mini" - }, - { - "id": "o3-pro", - "name": "O3 Pro" - }, - { - "id": "o4-mini", - "name": "O4 Mini" - }, - { - "id": "o1", - "name": "O1" - }, - { - "id": "o1-mini", - "name": "O1 Mini" - }, - { - "id": "text-embedding-3-large", - "name": "Text Embedding 3 Large", - "type": "embedding" - }, - { - "id": "text-embedding-3-small", - "name": "Text Embedding 3 Small", - "type": "embedding" - }, - { - "id": "text-embedding-ada-002", - "name": "Text Embedding Ada 002", - "type": "embedding" - }, - { - "id": "tts-1", - "name": "TTS-1", - "type": "tts" - }, - { - "id": "tts-1-hd", - "name": "TTS-1 HD", - "type": "tts" - }, - { - "id": "gpt-4o-mini-tts", - "name": "GPT-4o Mini TTS", - "type": "tts" - }, - { - "id": "whisper-1", - "name": "Whisper 1", - "type": "stt", - "params": [ - "language", - "response_format", - "temperature", - "prompt" - ] - }, - { - "id": "gpt-4o-transcribe", - "name": "GPT-4o Transcribe", - "type": "stt", - "params": [ - "language", - "response_format", - "temperature", - "prompt" - ] - }, - { - "id": "gpt-4o-mini-transcribe", - "name": "GPT-4o Mini Transcribe", - "type": "stt", - "params": [ - "language", - "response_format", - "temperature", - "prompt" - ] - }, - { - "id": "gpt-image-1", - "name": "GPT Image 1", - "type": "image", - "params": [ - "n", - "size", - "quality", - "response_format" - ] - }, - { - "id": "dall-e-3", - "name": "DALL-E 3", - "type": "image", - "params": [ - "size", - "quality", - "style", - "response_format" - ] - }, - { - "id": "dall-e-2", - "name": "DALL-E 2", - "type": "image", - "params": [ - "n", - "size", - "response_format" - ] - } - ] + models: [ + { id: "gpt-5.4", name: "GPT-5.4" }, + { id: "gpt-5.4-mini", name: "GPT-5.4 Mini" }, + { id: "gpt-5.4-nano", name: "GPT-5.4 Nano" }, + { id: "gpt-5.2", name: "GPT-5.2" }, + { id: "gpt-5.1", name: "GPT-5.1" }, + { id: "gpt-5", name: "GPT-5" }, + { id: "gpt-5-mini", name: "GPT-5 Mini" }, + { id: "gpt-5-nano", name: "GPT-5 Nano" }, + { id: "gpt-4o", name: "GPT-4o" }, + { id: "gpt-4o-mini", name: "GPT-4o Mini" }, + { id: "gpt-4-turbo", name: "GPT-4 Turbo" }, + { id: "gpt-4.1", name: "GPT-4.1" }, + { id: "gpt-4.1-mini", name: "GPT-4.1 Mini" }, + { id: "gpt-4.1-nano", name: "GPT-4.1 Nano" }, + { id: "o3", name: "O3" }, + { id: "o3-mini", name: "O3 Mini" }, + { id: "o3-pro", name: "O3 Pro" }, + { id: "o4-mini", name: "O4 Mini" }, + { id: "o1", name: "O1" }, + { id: "o1-mini", name: "O1 Mini" }, + { id: "text-embedding-3-large", name: "Text Embedding 3 Large", kind: "embedding" }, + { id: "text-embedding-3-small", name: "Text Embedding 3 Small", kind: "embedding" }, + { id: "text-embedding-ada-002", name: "Text Embedding Ada 002", kind: "embedding" }, + { id: "tts-1", name: "TTS-1", kind: "tts" }, + { id: "tts-1-hd", name: "TTS-1 HD", kind: "tts" }, + { id: "gpt-4o-mini-tts", name: "GPT-4o Mini TTS", kind: "tts" }, + { id: "whisper-1", name: "Whisper 1", params: ["language","response_format","temperature","prompt"], kind: "stt" }, + { id: "gpt-4o-transcribe", name: "GPT-4o Transcribe", params: ["language","response_format","temperature","prompt"], kind: "stt" }, + { id: "gpt-4o-mini-transcribe", name: "GPT-4o Mini Transcribe", params: ["language","response_format","temperature","prompt"], kind: "stt" }, + { id: "gpt-image-1", name: "GPT Image 1", params: ["n","size","quality","response_format"], kind: "image" }, + { id: "dall-e-3", name: "DALL-E 3", params: ["size","quality","style","response_format"], kind: "image" }, + { id: "dall-e-2", name: "DALL-E 2", params: ["n","size","response_format"], kind: "image" }, + ], + serviceKinds: ["llm","embedding","tts","stt","image","imageToText","webSearch"], + ttsConfig: { + baseUrl: "https://api.openai.com/v1/audio/speech", + authType: "apikey", + authHeader: "bearer", + format: "openai", + defaultModel: "gpt-4o-mini-tts", + }, + sttConfig: { + baseUrl: "https://api.openai.com/v1/audio/transcriptions", + authType: "apikey", + authHeader: "bearer", + format: "openai", + }, + embeddingConfig: { baseUrl: "https://api.openai.com/v1/embeddings", authType: "apikey", authHeader: "bearer" }, + imageConfig: { baseUrl: "https://api.openai.com/v1/images/generations" }, + searchViaChat: { defaultModel: "gpt-4o-mini", pricingUrl: "https://openai.com/api/pricing" }, }; diff --git a/open-sse/providers/registry/opencode-go.js b/open-sse/providers/registry/opencode-go.js index c4b6527b..7b4fbd20 100644 --- a/open-sse/providers/registry/opencode-go.js +++ b/open-sse/providers/registry/opencode-go.js @@ -1,67 +1,36 @@ - export default { - "id": "opencode-go", - "alias": "opencode-go", + id: "opencode-go", + alias: "opencode-go", + aliases: [ + "ocg", + ], + uiAlias: "ocg", display: { - "name": "OpenCode Go", - "icon": "terminal", - "color": "#E87040", - "textIcon": "OC", - "website": "https://opencode.ai/auth", - "notice": { - "text": "OpenCode Go subscription: $5/mo (then 0/mo). Access to Kimi, GLM, Qwen, MiMo, MiniMax models.", - "apiKeyUrl": "https://opencode.ai/auth" - } + name: "OpenCode Go", + icon: "terminal", + color: "#E87040", + textIcon: "OC", + website: "https://opencode.ai/auth", + notice: { + text: "OpenCode Go subscription: $5/mo (then 0/mo). Access to Kimi, GLM, Qwen, MiMo, MiniMax models.", + apiKeyUrl: "https://opencode.ai/auth", + }, }, category: "apikey", - uiAlias: "ocg", - aliases: ["ocg"], - "transport": { - "baseUrl": "https://opencode.ai/zen/go/v1/chat/completions", - "headers": {} + transport: { + baseUrl: "https://opencode.ai/zen/go/v1/chat/completions", + headers: {}, }, - "models": [ - { - "id": "kimi-k2.6", - "name": "Kimi K2.6" - }, - { - "id": "kimi-k2.5", - "name": "Kimi K2.5" - }, - { - "id": "glm-5.1", - "name": "GLM 5.1" - }, - { - "id": "glm-5", - "name": "GLM 5" - }, - { - "id": "qwen3.5-plus", - "name": "Qwen 3.5 Plus" - }, - { - "id": "qwen3.6-plus", - "name": "Qwen 3.6 Plus" - }, - { - "id": "mimo-v2-pro", - "name": "MiMo V2 Pro" - }, - { - "id": "mimo-v2-omni", - "name": "MiMo V2 Omni" - }, - { - "id": "minimax-m2.7", - "name": "MiniMax M2.7", - "targetFormat": "claude" - }, - { - "id": "minimax-m2.5", - "name": "MiniMax M2.5", - "targetFormat": "claude" - } - ] + models: [ + { id: "kimi-k2.6", name: "Kimi K2.6" }, + { id: "kimi-k2.5", name: "Kimi K2.5" }, + { id: "glm-5.1", name: "GLM 5.1" }, + { id: "glm-5", name: "GLM 5" }, + { id: "qwen3.5-plus", name: "Qwen 3.5 Plus" }, + { id: "qwen3.6-plus", name: "Qwen 3.6 Plus" }, + { id: "mimo-v2-pro", name: "MiMo V2 Pro" }, + { id: "mimo-v2-omni", name: "MiMo V2 Omni" }, + { id: "minimax-m2.7", name: "MiniMax M2.7", targetFormat: "claude" }, + { id: "minimax-m2.5", name: "MiniMax M2.5", targetFormat: "claude" }, + ], }; diff --git a/open-sse/providers/registry/opencode.js b/open-sse/providers/registry/opencode.js index 65258bde..ca3d7101 100644 --- a/open-sse/providers/registry/opencode.js +++ b/open-sse/providers/registry/opencode.js @@ -1,28 +1,23 @@ - export default { - "id": "opencode", - "alias": "oc", + id: "opencode", + alias: "oc", + uiAlias: "oc", display: { - "name": "OpenCode Free", - "icon": "terminal", - "color": "#E87040", - "textIcon": "OC" + name: "OpenCode Free", + icon: "terminal", + color: "#E87040", + textIcon: "OC", }, category: "free", - uiAlias: "oc", noAuth: true, - passthroughModels: true, - "transport": { - "baseUrl": "https://opencode.ai", - "headers": { - "x-opencode-client": "desktop" + transport: { + baseUrl: "https://opencode.ai", + headers: { + "x-opencode-client": "desktop", }, - "noAuth": true - }, - media: { noAuth: true, - passthroughModels: true, - modelsFetcher: { url: "https://opencode.ai/zen/v1/models", type: "opencode-free" } }, - "models": [] + models: [], + modelsFetcher: { url: "https://opencode.ai/zen/v1/models", type: "opencode-free" }, + passthroughModels: true, }; diff --git a/open-sse/providers/registry/openrouter.js b/open-sse/providers/registry/openrouter.js index c22d29d5..138f3e02 100644 --- a/open-sse/providers/registry/openrouter.js +++ b/open-sse/providers/registry/openrouter.js @@ -1,124 +1,57 @@ - export default { - "id": "openrouter", - "alias": "openrouter", + id: "openrouter", + alias: "openrouter", display: { - "name": "OpenRouter", - "icon": "router", - "color": "#F97316", - "textIcon": "OR", - "website": "https://openrouter.ai", - "notice": { - "text": "Free tier: 27+ free models, no credit card needed, 200 req/day. After 0 credit: 1,000 req/day.", - "apiKeyUrl": "https://openrouter.ai/settings/keys" - } + name: "OpenRouter", + icon: "router", + color: "#F97316", + textIcon: "OR", + website: "https://openrouter.ai", + notice: { + text: "Free tier: 27+ free models, no credit card needed, 200 req/day. After 0 credit: 1,000 req/day.", + apiKeyUrl: "https://openrouter.ai/settings/keys", + }, }, category: "freeTier", - "transport": { - "baseUrl": "https://openrouter.ai/api/v1/chat/completions", - "headers": { + transport: { + baseUrl: "https://openrouter.ai/api/v1/chat/completions", + headers: { "HTTP-Referer": "https://endpoint-proxy.local", - "X-Title": "Endpoint Proxy" - } + "X-Title": "Endpoint Proxy", + }, }, - media: { - serviceKinds: ["llm", "embedding", "tts", "imageToText"], - embeddingConfig: { baseUrl: "https://openrouter.ai/api/v1/embeddings", authType: "apikey", authHeader: "bearer", headers: { "HTTP-Referer": "https://endpoint-proxy.local", "X-Title": "Endpoint Proxy" }, models: [{ id: "openai/text-embedding-3-small", name: "Text Embedding 3 Small (OpenRouter)", dimensions: 1536 }, { id: "openai/text-embedding-3-large", name: "Text Embedding 3 Large (OpenRouter)", dimensions: 3072 }, { id: "openai/text-embedding-ada-002", name: "Text Embedding Ada 002 (OpenRouter)", dimensions: 1536 }] }, - modelsFetcher: { url: "https://openrouter.ai/api/v1/models", type: "openrouter-free" }, - imageConfig: { baseUrl: "https://openrouter.ai/api/v1/images/generations", headers: { "HTTP-Referer": "https://endpoint-proxy.local", "X-Title": "Endpoint Proxy" } }, - ttsConfig: { baseUrl: "https://openrouter.ai/api/v1/chat/completions", defaultModel: "openai/gpt-4o-mini-tts", headers: { "HTTP-Referer": "https://endpoint-proxy.local", "X-Title": "Endpoint Proxy" } }, - passthroughModels: true + models: [ + { id: "openai/text-embedding-3-large", name: "OpenAI Text Embedding 3 Large", kind: "embedding" }, + { id: "openai/text-embedding-3-small", name: "OpenAI Text Embedding 3 Small", kind: "embedding" }, + { id: "openai/text-embedding-ada-002", name: "OpenAI Text Embedding Ada 002", kind: "embedding" }, + { id: "qwen/qwen3-embedding-8b", name: "Qwen3 Embedding 8B", kind: "embedding" }, + { id: "perplexity/pplx-embed-v1-4b", name: "Perplexity Embed V1 4B", kind: "embedding" }, + { id: "perplexity/pplx-embed-v1-0.6b", name: "Perplexity Embed V1 0.6B", kind: "embedding" }, + { id: "nvidia/llama-nemotron-embed-vl-1b-v2:free", name: "NVIDIA Nemotron Embed VL 1B V2 (Free)", kind: "embedding" }, + { id: "openai/gpt-4o-mini-tts", name: "GPT-4o Mini TTS", kind: "tts" }, + { id: "openai/tts-1-hd", name: "TTS-1 HD", kind: "tts" }, + { id: "openai/tts-1", name: "TTS-1", kind: "tts" }, + { id: "openai/dall-e-3", name: "DALL-E 3 (via OpenRouter)", params: ["size","quality","style","response_format"], kind: "image" }, + { id: "openai/gpt-image-1", name: "GPT Image 1 (via OpenRouter)", params: ["n","size","quality","response_format"], kind: "image" }, + { id: "google/imagen-3.0-generate-002", name: "Imagen 3 (via OpenRouter)", params: ["n","size"], kind: "image" }, + { id: "black-forest-labs/FLUX.1-schnell", name: "FLUX.1 Schnell (via OpenRouter)", params: ["n","size"], kind: "image" }, + ], + serviceKinds: ["llm","embedding","tts","imageToText"], + ttsConfig: { + baseUrl: "https://openrouter.ai/api/v1/chat/completions", + defaultModel: "openai/gpt-4o-mini-tts", + headers: {"HTTP-Referer":"https://endpoint-proxy.local","X-Title":"Endpoint Proxy"}, }, - "models": [ - { - "id": "openai/text-embedding-3-large", - "name": "OpenAI Text Embedding 3 Large", - "type": "embedding" - }, - { - "id": "openai/text-embedding-3-small", - "name": "OpenAI Text Embedding 3 Small", - "type": "embedding" - }, - { - "id": "openai/text-embedding-ada-002", - "name": "OpenAI Text Embedding Ada 002", - "type": "embedding" - }, - { - "id": "qwen/qwen3-embedding-8b", - "name": "Qwen3 Embedding 8B", - "type": "embedding" - }, - { - "id": "perplexity/pplx-embed-v1-4b", - "name": "Perplexity Embed V1 4B", - "type": "embedding" - }, - { - "id": "perplexity/pplx-embed-v1-0.6b", - "name": "Perplexity Embed V1 0.6B", - "type": "embedding" - }, - { - "id": "nvidia/llama-nemotron-embed-vl-1b-v2:free", - "name": "NVIDIA Nemotron Embed VL 1B V2 (Free)", - "type": "embedding" - }, - { - "id": "openai/gpt-4o-mini-tts", - "name": "GPT-4o Mini TTS", - "type": "tts" - }, - { - "id": "openai/tts-1-hd", - "name": "TTS-1 HD", - "type": "tts" - }, - { - "id": "openai/tts-1", - "name": "TTS-1", - "type": "tts" - }, - { - "id": "openai/dall-e-3", - "name": "DALL-E 3 (via OpenRouter)", - "type": "image", - "params": [ - "size", - "quality", - "style", - "response_format" - ] - }, - { - "id": "openai/gpt-image-1", - "name": "GPT Image 1 (via OpenRouter)", - "type": "image", - "params": [ - "n", - "size", - "quality", - "response_format" - ] - }, - { - "id": "google/imagen-3.0-generate-002", - "name": "Imagen 3 (via OpenRouter)", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "black-forest-labs/FLUX.1-schnell", - "name": "FLUX.1 Schnell (via OpenRouter)", - "type": "image", - "params": [ - "n", - "size" - ] - } - ] + embeddingConfig: { + baseUrl: "https://openrouter.ai/api/v1/embeddings", + authType: "apikey", + authHeader: "bearer", + headers: {"HTTP-Referer":"https://endpoint-proxy.local","X-Title":"Endpoint Proxy"}, + }, + imageConfig: { + baseUrl: "https://openrouter.ai/api/v1/images/generations", + headers: {"HTTP-Referer":"https://endpoint-proxy.local","X-Title":"Endpoint Proxy"}, + }, + modelsFetcher: { url: "https://openrouter.ai/api/v1/models", type: "openrouter-free" }, + passthroughModels: true, }; diff --git a/open-sse/providers/registry/perplexity-web.js b/open-sse/providers/registry/perplexity-web.js index 043f40c8..331cf430 100644 --- a/open-sse/providers/registry/perplexity-web.js +++ b/open-sse/providers/registry/perplexity-web.js @@ -1,52 +1,32 @@ - export default { - "id": "perplexity-web", - "alias": "perplexity-web", + id: "perplexity-web", + alias: "perplexity-web", + aliases: [ + "pw", + ], + uiAlias: "pw", display: { - "name": "Perplexity Web (Pro/Max)", - "icon": "search", - "color": "#20808D", - "textIcon": "PW", - "website": "https://www.perplexity.ai" + name: "Perplexity Web (Pro/Max)", + icon: "search", + color: "#20808D", + textIcon: "PW", + website: "https://www.perplexity.ai", }, category: "webCookie", - uiAlias: "pw", authType: "cookie", authHint: "Paste your __Secure-next-auth.session-token cookie value from perplexity.ai", - aliases: ["pw"], - "transport": { - "baseUrl": "https://www.perplexity.ai/rest/sse/perplexity_ask", - "format": "perplexity-web", - "authType": "cookie" + transport: { + baseUrl: "https://www.perplexity.ai/rest/sse/perplexity_ask", + format: "perplexity-web", + authType: "cookie", }, - "models": [ - { - "id": "pplx-auto", - "name": "Perplexity Auto (Free)" - }, - { - "id": "pplx-sonar", - "name": "Perplexity Sonar" - }, - { - "id": "pplx-gpt", - "name": "GPT-5.4 (via Perplexity)" - }, - { - "id": "pplx-gemini", - "name": "Gemini 3.1 Pro (via Perplexity)" - }, - { - "id": "pplx-sonnet", - "name": "Claude Sonnet 4.6 (via Perplexity)" - }, - { - "id": "pplx-opus", - "name": "Claude Opus 4.6 (via Perplexity)" - }, - { - "id": "pplx-nemotron", - "name": "Nemotron 3 Super (via Perplexity)" - } - ] + models: [ + { id: "pplx-auto", name: "Perplexity Auto (Free)" }, + { id: "pplx-sonar", name: "Perplexity Sonar" }, + { id: "pplx-gpt", name: "GPT-5.4 (via Perplexity)" }, + { id: "pplx-gemini", name: "Gemini 3.1 Pro (via Perplexity)" }, + { id: "pplx-sonnet", name: "Claude Sonnet 4.6 (via Perplexity)" }, + { id: "pplx-opus", name: "Claude Opus 4.6 (via Perplexity)" }, + { id: "pplx-nemotron", name: "Nemotron 3 Super (via Perplexity)" }, + ], }; diff --git a/open-sse/providers/registry/perplexity.js b/open-sse/providers/registry/perplexity.js index 98138095..98309bdf 100644 --- a/open-sse/providers/registry/perplexity.js +++ b/open-sse/providers/registry/perplexity.js @@ -1,37 +1,34 @@ - export default { - "id": "perplexity", - "alias": "perplexity", + id: "perplexity", + alias: "perplexity", + aliases: [ + "pplx", + ], + uiAlias: "pplx", display: { - "name": "Perplexity", - "icon": "search", - "color": "#20808D", - "textIcon": "PP", - "website": "https://www.perplexity.ai", - "notice": { - "apiKeyUrl": "https://www.perplexity.ai/settings/api" - } + name: "Perplexity", + icon: "search", + color: "#20808D", + textIcon: "PP", + website: "https://www.perplexity.ai", + notice: { + apiKeyUrl: "https://www.perplexity.ai/settings/api", + }, }, category: "apikey", - uiAlias: "pplx", authType: "apikey", - aliases: ["pplx"], - "transport": { - "baseUrl": "https://api.perplexity.ai/chat/completions", - "validateUrl": "https://api.perplexity.ai/models" + transport: { + baseUrl: "https://api.perplexity.ai/chat/completions", + validateUrl: "https://api.perplexity.ai/models", }, - media: { - serviceKinds: ["llm", "webSearch"], - searchViaChat: { defaultModel: "sonar", endpoint: "https://api.perplexity.ai/chat/completions", pricingUrl: "https://docs.perplexity.ai/guides/pricing" } + models: [ + { id: "sonar-pro", name: "Sonar Pro" }, + { id: "sonar", name: "Sonar" }, + ], + serviceKinds: ["llm","webSearch"], + searchViaChat: { + defaultModel: "sonar", + endpoint: "https://api.perplexity.ai/chat/completions", + pricingUrl: "https://docs.perplexity.ai/guides/pricing", }, - "models": [ - { - "id": "sonar-pro", - "name": "Sonar Pro" - }, - { - "id": "sonar", - "name": "Sonar" - } - ] }; diff --git a/open-sse/providers/registry/qoder.js b/open-sse/providers/registry/qoder.js index fc280df5..8959731e 100644 --- a/open-sse/providers/registry/qoder.js +++ b/open-sse/providers/registry/qoder.js @@ -1,86 +1,53 @@ - export default { - "id": "qoder", - "alias": "qd", + id: "qoder", + alias: "qd", + uiAlias: "qd", display: { - "name": "Qoder", - "icon": "water_drop", - "color": "#EC4899", - "website": "https://qoder.com", - "notice": { - "signupUrl": "https://qoder.com" - }, - "deprecated": true, - "deprecationNotice": "RISK_NOTICE" + name: "Qoder", + icon: "water_drop", + color: "#EC4899", + website: "https://qoder.com", + notice: { + signupUrl: "https://qoder.com", + }, + deprecated: true, + deprecationNotice: "RISK_NOTICE", }, category: "free", - uiAlias: "qd", - "transport": { - "baseUrl": "https://api3.qoder.sh/algo/api/v2/service/pro/sse/agent_chat_generation", - "headers": {}, - "timeoutMs": 120000, - "stallTimeoutMs": 120000, - usage: { url: "https://openapi.qoder.sh/api/v2/quota/usage" } + transport: { + baseUrl: "https://api3.qoder.sh/algo/api/v2/service/pro/sse/agent_chat_generation", + headers: {}, + timeoutMs: 120000, + stallTimeoutMs: 120000, + usage: { + url: "https://openapi.qoder.sh/api/v2/quota/usage", + }, }, - "oauth": { - "openApiBaseUrl": "https://openapi.qoder.sh", - "centerBaseUrl": "https://center.qoder.sh", - "chatBaseUrl": "https://api3.qoder.sh", - "deviceTokenUrl": "https://openapi.qoder.sh/api/v1/deviceToken/poll", - "refreshUrl": "https://center.qoder.sh/algo/api/v3/user/refresh_token", - "userInfoUrl": "https://openapi.qoder.sh/api/v1/userinfo", - "quotaUsageUrl": "https://openapi.qoder.sh/api/v2/quota/usage", - "loginUrl": "https://qoder.com/device/selectAccounts" - }, - "models": [ - { - "id": "auto", - "name": "Qoder Auto" - }, - { - "id": "ultimate", - "name": "Qoder Ultimate" - }, - { - "id": "performance", - "name": "Qoder Performance" - }, - { - "id": "efficient", - "name": "Qoder Efficient" - }, - { - "id": "lite", - "name": "Qoder Lite" - }, - { - "id": "qmodel", - "name": "Qwen 3.6 Plus (Qoder)" - }, - { - "id": "qmodel_latest", - "name": "Qoder Qwen 3.7 Max" - }, - { - "id": "dmodel", - "name": "DeepSeek V4 Pro (Qoder)" - }, - { - "id": "dfmodel", - "name": "DeepSeek V4 Flash (Qoder)" - }, - { - "id": "gm51model", - "name": "GLM 5.1 (Qoder)" - }, - { - "id": "kmodel", - "name": "Kimi K2.6 (Qoder)" - }, - { - "id": "mmodel", - "name": "MiniMax M2.7 (Qoder)" - } + models: [ + { id: "auto", name: "Qoder Auto" }, + { id: "ultimate", name: "Qoder Ultimate" }, + { id: "performance", name: "Qoder Performance" }, + { id: "efficient", name: "Qoder Efficient" }, + { id: "lite", name: "Qoder Lite" }, + { id: "qmodel", name: "Qwen 3.6 Plus (Qoder)" }, + { id: "qmodel_latest", name: "Qoder Qwen 3.7 Max" }, + { id: "dmodel", name: "DeepSeek V4 Pro (Qoder)" }, + { id: "dfmodel", name: "DeepSeek V4 Flash (Qoder)" }, + { id: "gm51model", name: "GLM 5.1 (Qoder)" }, + { id: "kmodel", name: "Kimi K2.6 (Qoder)" }, + { id: "mmodel", name: "MiniMax M2.7 (Qoder)" }, ], - features: {"usage":true}, + oauth: { + openApiBaseUrl: "https://openapi.qoder.sh", + centerBaseUrl: "https://center.qoder.sh", + chatBaseUrl: "https://api3.qoder.sh", + deviceTokenUrl: "https://openapi.qoder.sh/api/v1/deviceToken/poll", + refreshUrl: "https://center.qoder.sh/algo/api/v3/user/refresh_token", + userInfoUrl: "https://openapi.qoder.sh/api/v1/userinfo", + quotaUsageUrl: "https://openapi.qoder.sh/api/v2/quota/usage", + loginUrl: "https://qoder.com/device/selectAccounts", + }, + features: { + usage: true, + }, }; diff --git a/open-sse/providers/registry/qwen.js b/open-sse/providers/registry/qwen.js index b2ffeab6..4dd4d9e4 100644 --- a/open-sse/providers/registry/qwen.js +++ b/open-sse/providers/registry/qwen.js @@ -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" - } - ] }; diff --git a/open-sse/providers/registry/recraft.js b/open-sse/providers/registry/recraft.js index da867801..6f14f236 100644 --- a/open-sse/providers/registry/recraft.js +++ b/open-sse/providers/registry/recraft.js @@ -1,44 +1,23 @@ - export default { - "id": "recraft", - "alias": "recraft", + id: "recraft", + alias: "recraft", display: { - "name": "Recraft", - "icon": "image", - "color": "#EC4899", - "textIcon": "RC", - "website": "https://recraft.ai", - "notice": { - "apiKeyUrl": "https://www.recraft.ai/profile/api" - } + name: "Recraft", + icon: "image", + color: "#EC4899", + textIcon: "RC", + website: "https://recraft.ai", + notice: { + apiKeyUrl: "https://www.recraft.ai/profile/api", + }, }, category: "apikey", authType: "apikey", - "transport": null, - media: { - serviceKinds: ["image"], - imageConfig: { baseUrl: "https://external.api.recraft.ai/v1/images/generations" } - }, - "models": [ - { - "id": "recraftv3", - "name": "Recraft V3", - "type": "image", - "params": [ - "n", - "size", - "style" - ] - }, - { - "id": "recraftv2", - "name": "Recraft V2", - "type": "image", - "params": [ - "n", - "size", - "style" - ] - } - ] + transport: null, + models: [ + { id: "recraftv3", name: "Recraft V3", params: ["n","size","style"], kind: "image" }, + { id: "recraftv2", name: "Recraft V2", params: ["n","size","style"], kind: "image" }, + ], + serviceKinds: ["image"], + imageConfig: { baseUrl: "https://external.api.recraft.ai/v1/images/generations" }, }; diff --git a/open-sse/providers/registry/runwayml.js b/open-sse/providers/registry/runwayml.js index 28f1bb9c..bdd922cc 100644 --- a/open-sse/providers/registry/runwayml.js +++ b/open-sse/providers/registry/runwayml.js @@ -1,54 +1,29 @@ - export default { - "id": "runwayml", - "alias": "runwayml", + id: "runwayml", + alias: "runwayml", + aliases: [ + "runway", + ], + uiAlias: "runway", display: { - "name": "Runway ML", - "icon": "movie", - "color": "#000000", - "textIcon": "RW", - "website": "https://runwayml.com", - "notice": { - "apiKeyUrl": "https://dev.runwayml.com" - } + name: "Runway ML", + icon: "movie", + color: "#000000", + textIcon: "RW", + website: "https://runwayml.com", + notice: { + apiKeyUrl: "https://dev.runwayml.com", + }, }, category: "apikey", - uiAlias: "runway", authType: "apikey", - aliases: ["runway"], - "transport": null, - media: { - serviceKinds: ["image"], - imageConfig: { baseUrl: "https://api.dev.runwayml.com/v1" } - }, - "models": [ - { - "id": "gen4_image", - "name": "Gen-4 Image", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "gen4_image_turbo", - "name": "Gen-4 Image Turbo", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "gen4_turbo", - "name": "Gen-4 Turbo", - "type": "video", - "params": [] - }, - { - "id": "gen3a_turbo", - "name": "Gen-3 Alpha Turbo", - "type": "video", - "params": [] - } - ] + transport: null, + models: [ + { id: "gen4_image", name: "Gen-4 Image", params: ["size"], kind: "image" }, + { id: "gen4_image_turbo", name: "Gen-4 Image Turbo", params: ["size"], kind: "image" }, + { id: "gen4_turbo", name: "Gen-4 Turbo", params: [], kind: "video" }, + { id: "gen3a_turbo", name: "Gen-3 Alpha Turbo", params: [], kind: "video" }, + ], + serviceKinds: ["image"], + imageConfig: { baseUrl: "https://api.dev.runwayml.com/v1" }, }; diff --git a/open-sse/providers/registry/sdwebui.js b/open-sse/providers/registry/sdwebui.js index cd3a23cc..0b2a8d0b 100644 --- a/open-sse/providers/registry/sdwebui.js +++ b/open-sse/providers/registry/sdwebui.js @@ -1,38 +1,19 @@ - export default { - "id": "sdwebui", - "alias": "sdwebui", + id: "sdwebui", + alias: "sdwebui", display: { - "name": "SD WebUI", - "icon": "brush", - "color": "#FF7043", - "textIcon": "SD", - "website": "https://github.com/AUTOMATIC1111/stable-diffusion-webui" + name: "SD WebUI", + icon: "brush", + color: "#FF7043", + textIcon: "SD", + website: "https://github.com/AUTOMATIC1111/stable-diffusion-webui", }, category: "apikey", - "transport": null, - media: { - serviceKinds: ["image"], - imageConfig: { baseUrl: "http://localhost:7860/sdapi/v1/txt2img" } - }, - "models": [ - { - "id": "stable-diffusion-v1-5", - "name": "Stable Diffusion v1.5", - "type": "image", - "params": [ - "n", - "size" - ] - }, - { - "id": "sdxl-base-1.0", - "name": "SDXL Base 1.0", - "type": "image", - "params": [ - "n", - "size" - ] - } - ] + transport: null, + models: [ + { id: "stable-diffusion-v1-5", name: "Stable Diffusion v1.5", params: ["n","size"], kind: "image" }, + { id: "sdxl-base-1.0", name: "SDXL Base 1.0", params: ["n","size"], kind: "image" }, + ], + serviceKinds: ["image"], + imageConfig: { baseUrl: "http://localhost:7860/sdapi/v1/txt2img" }, }; diff --git a/open-sse/providers/registry/siliconflow.js b/open-sse/providers/registry/siliconflow.js index 9793fdd9..1703db52 100644 --- a/open-sse/providers/registry/siliconflow.js +++ b/open-sse/providers/registry/siliconflow.js @@ -1,86 +1,37 @@ - export default { - "id": "siliconflow", - "alias": "siliconflow", + id: "siliconflow", + alias: "siliconflow", display: { - "name": "SiliconFlow", - "icon": "cloud_queue", - "color": "#5B6EF5", - "textIcon": "SF", - "website": "https://cloud.siliconflow.com", - "notice": { - "apiKeyUrl": "https://cloud.siliconflow.com/account/ak" - } + name: "SiliconFlow", + icon: "cloud_queue", + color: "#5B6EF5", + textIcon: "SF", + website: "https://cloud.siliconflow.com", + notice: { + apiKeyUrl: "https://cloud.siliconflow.com/account/ak", + }, }, category: "apikey", - "transport": { - "baseUrl": "https://api.siliconflow.com/v1/chat/completions", - "validateUrl": "https://api.siliconflow.com/v1/models" + transport: { + baseUrl: "https://api.siliconflow.com/v1/chat/completions", + validateUrl: "https://api.siliconflow.com/v1/models", }, - "models": [ - { - "id": "deepseek-ai/DeepSeek-V4-Pro", - "name": "DeepSeek V4 Pro" - }, - { - "id": "deepseek-ai/DeepSeek-V4-Flash", - "name": "DeepSeek V4 Flash" - }, - { - "id": "deepseek-ai/DeepSeek-V3.2", - "name": "DeepSeek V3.2" - }, - { - "id": "deepseek-ai/DeepSeek-V3.2-Exp", - "name": "DeepSeek V3.2 Exp" - }, - { - "id": "deepseek-ai/DeepSeek-V3.1", - "name": "DeepSeek V3.1" - }, - { - "id": "deepseek-ai/DeepSeek-V3.1-Terminus", - "name": "DeepSeek V3.1 Terminus" - }, - { - "id": "deepseek-ai/DeepSeek-R1", - "name": "DeepSeek R1" - }, - { - "id": "Qwen/Qwen3.5-397B-A17B", - "name": "Qwen 3.5 397B A17B" - }, - { - "id": "Qwen/Qwen3.5-122B-A10B", - "name": "Qwen 3.5 122B A10B" - }, - { - "id": "zai-org/GLM-5.1", - "name": "GLM 5.1" - }, - { - "id": "zai-org/GLM-5", - "name": "GLM 5" - }, - { - "id": "moonshotai/Kimi-K2.6", - "name": "Kimi K2.6" - }, - { - "id": "moonshotai/Kimi-K2.5", - "name": "Kimi K2.5" - }, - { - "id": "openai/gpt-oss-120b", - "name": "GPT OSS 120B" - }, - { - "id": "MiniMaxAI/MiniMax-M2.5", - "name": "MiniMax M2.5" - }, - { - "id": "inclusionAI/Ling-flash-2.0", - "name": "Ling Flash 2.0" - } - ] + models: [ + { id: "deepseek-ai/DeepSeek-V4-Pro", name: "DeepSeek V4 Pro" }, + { id: "deepseek-ai/DeepSeek-V4-Flash", name: "DeepSeek V4 Flash" }, + { id: "deepseek-ai/DeepSeek-V3.2", name: "DeepSeek V3.2" }, + { id: "deepseek-ai/DeepSeek-V3.2-Exp", name: "DeepSeek V3.2 Exp" }, + { id: "deepseek-ai/DeepSeek-V3.1", name: "DeepSeek V3.1" }, + { id: "deepseek-ai/DeepSeek-V3.1-Terminus", name: "DeepSeek V3.1 Terminus" }, + { id: "deepseek-ai/DeepSeek-R1", name: "DeepSeek R1" }, + { id: "Qwen/Qwen3.5-397B-A17B", name: "Qwen 3.5 397B A17B" }, + { id: "Qwen/Qwen3.5-122B-A10B", name: "Qwen 3.5 122B A10B" }, + { id: "zai-org/GLM-5.1", name: "GLM 5.1" }, + { id: "zai-org/GLM-5", name: "GLM 5" }, + { id: "moonshotai/Kimi-K2.6", name: "Kimi K2.6" }, + { id: "moonshotai/Kimi-K2.5", name: "Kimi K2.5" }, + { id: "openai/gpt-oss-120b", name: "GPT OSS 120B" }, + { id: "MiniMaxAI/MiniMax-M2.5", name: "MiniMax M2.5" }, + { id: "inclusionAI/Ling-flash-2.0", name: "Ling Flash 2.0" }, + ], }; diff --git a/open-sse/providers/registry/stability-ai.js b/open-sse/providers/registry/stability-ai.js index c1783ae9..632da433 100644 --- a/open-sse/providers/registry/stability-ai.js +++ b/open-sse/providers/registry/stability-ai.js @@ -1,67 +1,30 @@ - export default { - "id": "stability-ai", - "alias": "stability-ai", + id: "stability-ai", + alias: "stability-ai", + aliases: [ + "stability", + ], + uiAlias: "stability", display: { - "name": "Stability AI", - "icon": "image", - "color": "#8B5CF6", - "textIcon": "SA", - "website": "https://stability.ai", - "notice": { - "apiKeyUrl": "https://platform.stability.ai/account/keys" - } + name: "Stability AI", + icon: "image", + color: "#8B5CF6", + textIcon: "SA", + website: "https://stability.ai", + notice: { + apiKeyUrl: "https://platform.stability.ai/account/keys", + }, }, category: "apikey", - uiAlias: "stability", authType: "apikey", - aliases: ["stability"], - "transport": null, - media: { - serviceKinds: ["image"], - imageConfig: { baseUrl: "https://api.stability.ai/v2beta/stable-image/generate" } - }, - "models": [ - { - "id": "stable-image-ultra", - "name": "Stable Image Ultra", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "stable-image-core", - "name": "Stable Image Core", - "type": "image", - "params": [ - "size", - "style" - ] - }, - { - "id": "sd3.5-large", - "name": "Stable Diffusion 3.5 Large", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "sd3.5-large-turbo", - "name": "Stable Diffusion 3.5 Large Turbo", - "type": "image", - "params": [ - "size" - ] - }, - { - "id": "sd3.5-medium", - "name": "Stable Diffusion 3.5 Medium", - "type": "image", - "params": [ - "size" - ] - } - ] + transport: null, + models: [ + { id: "stable-image-ultra", name: "Stable Image Ultra", params: ["size"], kind: "image" }, + { id: "stable-image-core", name: "Stable Image Core", params: ["size","style"], kind: "image" }, + { id: "sd3.5-large", name: "Stable Diffusion 3.5 Large", params: ["size"], kind: "image" }, + { id: "sd3.5-large-turbo", name: "Stable Diffusion 3.5 Large Turbo", params: ["size"], kind: "image" }, + { id: "sd3.5-medium", name: "Stable Diffusion 3.5 Medium", params: ["size"], kind: "image" }, + ], + serviceKinds: ["image"], + imageConfig: { baseUrl: "https://api.stability.ai/v2beta/stable-image/generate" }, }; diff --git a/open-sse/providers/registry/together.js b/open-sse/providers/registry/together.js index 92db8fc3..0d940339 100644 --- a/open-sse/providers/registry/together.js +++ b/open-sse/providers/registry/together.js @@ -1,52 +1,29 @@ - export default { - "id": "together", - "alias": "together", + id: "together", + alias: "together", display: { - "name": "Together AI", - "icon": "group_work", - "color": "#0F6FFF", - "textIcon": "TG", - "website": "https://www.together.ai", - "notice": { - "apiKeyUrl": "https://api.together.xyz/settings/api-keys" - } + name: "Together AI", + icon: "group_work", + color: "#0F6FFF", + textIcon: "TG", + website: "https://www.together.ai", + notice: { + apiKeyUrl: "https://api.together.xyz/settings/api-keys", + }, }, category: "apikey", authType: "apikey", - "transport": { - "baseUrl": "https://api.together.xyz/v1/chat/completions", - "validateUrl": "https://api.together.xyz/v1/models" + transport: { + baseUrl: "https://api.together.xyz/v1/chat/completions", + validateUrl: "https://api.together.xyz/v1/models", }, - media: { - embeddingConfig: { baseUrl: "https://api.together.xyz/v1/embeddings" } - }, - "models": [ - { - "id": "meta-llama/Llama-3.3-70B-Instruct-Turbo", - "name": "Llama 3.3 70B Turbo" - }, - { - "id": "deepseek-ai/DeepSeek-R1", - "name": "DeepSeek R1" - }, - { - "id": "Qwen/Qwen3-235B-A22B", - "name": "Qwen3 235B" - }, - { - "id": "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8", - "name": "Llama 4 Maverick" - }, - { - "id": "BAAI/bge-large-en-v1.5", - "name": "BGE Large EN v1.5", - "type": "embedding" - }, - { - "id": "togethercomputer/m2-bert-80M-8k-retrieval", - "name": "M2 BERT 80M 8K", - "type": "embedding" - } - ] + models: [ + { id: "meta-llama/Llama-3.3-70B-Instruct-Turbo", name: "Llama 3.3 70B Turbo" }, + { id: "deepseek-ai/DeepSeek-R1", name: "DeepSeek R1" }, + { id: "Qwen/Qwen3-235B-A22B", name: "Qwen3 235B" }, + { id: "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8", name: "Llama 4 Maverick" }, + { id: "BAAI/bge-large-en-v1.5", name: "BGE Large EN v1.5", kind: "embedding" }, + { id: "togethercomputer/m2-bert-80M-8k-retrieval", name: "M2 BERT 80M 8K", kind: "embedding" }, + ], + embeddingConfig: { baseUrl: "https://api.together.xyz/v1/embeddings" }, }; diff --git a/open-sse/providers/registry/vercel-ai-gateway.js b/open-sse/providers/registry/vercel-ai-gateway.js index 24619d8d..673b9786 100644 --- a/open-sse/providers/registry/vercel-ai-gateway.js +++ b/open-sse/providers/registry/vercel-ai-gateway.js @@ -1,36 +1,39 @@ - export default { - "id": "vercel-ai-gateway", - "alias": "vercel-ai-gateway", + id: "vercel-ai-gateway", + alias: "vercel-ai-gateway", + aliases: [ + "vercel", + ], + uiAlias: "vercel", display: { - "name": "Vercel AI Gateway", - "icon": "deployed_code", - "color": "#111827", - "textIcon": "VG", - "website": "https://vercel.com/ai-gateway", - "notice": { - "text": "Unified OpenAI-compatible endpoint from Vercel. Use your AI Gateway API key, then pick models with provider/model IDs like anthropic/claude-sonnet-4.6 or openai/gpt-5.4.", - "apiKeyUrl": "https://vercel.com/dashboard/~/ai-gateway" - } + name: "Vercel AI Gateway", + icon: "deployed_code", + color: "#111827", + textIcon: "VG", + website: "https://vercel.com/ai-gateway", + notice: { + text: "Unified OpenAI-compatible endpoint from Vercel. Use your AI Gateway API key, then pick models with provider/model IDs like anthropic/claude-sonnet-4.6 or openai/gpt-5.4.", + apiKeyUrl: "https://vercel.com/dashboard/~/ai-gateway", + }, }, category: "apikey", - uiAlias: "vercel", - passthroughModels: true, - aliases: ["vercel"], - "transport": { - "baseUrl": "https://ai-gateway.vercel.sh/v1/chat/completions", - "retry": { - "429": 2 + transport: { + baseUrl: "https://ai-gateway.vercel.sh/v1/chat/completions", + retry: { + "429": 2, + }, + usage: { + url: "https://ai-gateway.vercel.sh/v1/credits", }, - usage: { url: "https://ai-gateway.vercel.sh/v1/credits" } }, - media: { - serviceKinds: ["llm", "embedding", "image", "imageToText", "webSearch"], - searchViaChat: { defaultModel: "openai/gpt-4o-mini", pricingUrl: "https://vercel.com/docs/ai-gateway/pricing" }, - modelsFetcher: { url: "https://ai-gateway.vercel.sh/v1/models", type: "openai" }, - imageConfig: { baseUrl: "https://ai-gateway.vercel.sh/v1/images/generations" }, - embeddingConfig: { baseUrl: "https://ai-gateway.vercel.sh/v1/embeddings" }, - passthroughModels: true + serviceKinds: ["llm","embedding","image","imageToText","webSearch"], + embeddingConfig: { baseUrl: "https://ai-gateway.vercel.sh/v1/embeddings" }, + imageConfig: { baseUrl: "https://ai-gateway.vercel.sh/v1/images/generations" }, + searchViaChat: { defaultModel: "openai/gpt-4o-mini", pricingUrl: "https://vercel.com/docs/ai-gateway/pricing" }, + modelsFetcher: { url: "https://ai-gateway.vercel.sh/v1/models", type: "openai" }, + passthroughModels: true, + features: { + usage: true, + usageApikey: true, }, - features: {"usage":true,"usageApikey":true}, }; diff --git a/open-sse/providers/registry/vertex-partner.js b/open-sse/providers/registry/vertex-partner.js index 4fdcf8e4..168c64b9 100644 --- a/open-sse/providers/registry/vertex-partner.js +++ b/open-sse/providers/registry/vertex-partner.js @@ -1,39 +1,28 @@ - export default { - "id": "vertex-partner", - "alias": "vertex-partner", + id: "vertex-partner", + alias: "vertex-partner", + aliases: [ + "vxp", + ], + uiAlias: "vxp", display: { - "name": "Vertex Partner", - "icon": "cloud", - "color": "#34A853", - "textIcon": "VP", - "website": "https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models", - "notice": { - "apiKeyUrl": "https://console.cloud.google.com/iam-admin/serviceaccounts" - } + name: "Vertex Partner", + icon: "cloud", + color: "#34A853", + textIcon: "VP", + website: "https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models", + notice: { + apiKeyUrl: "https://console.cloud.google.com/iam-admin/serviceaccounts", + }, }, category: "apikey", - uiAlias: "vxp", - aliases: ["vxp"], - "transport": { - "baseUrl": "https://aiplatform.googleapis.com" + transport: { + baseUrl: "https://aiplatform.googleapis.com", }, - "models": [ - { - "id": "deepseek-ai/deepseek-v3.2-maas", - "name": "DeepSeek V3.2 (Vertex)" - }, - { - "id": "qwen/qwen3-next-80b-a3b-thinking-maas", - "name": "Qwen3 Next 80B Thinking (Vertex)" - }, - { - "id": "qwen/qwen3-next-80b-a3b-instruct-maas", - "name": "Qwen3 Next 80B Instruct (Vertex)" - }, - { - "id": "zai-org/glm-5-maas", - "name": "GLM-5 (Vertex)" - } - ] + models: [ + { id: "deepseek-ai/deepseek-v3.2-maas", name: "DeepSeek V3.2 (Vertex)" }, + { id: "qwen/qwen3-next-80b-a3b-thinking-maas", name: "Qwen3 Next 80B Thinking (Vertex)" }, + { id: "qwen/qwen3-next-80b-a3b-instruct-maas", name: "Qwen3 Next 80B Instruct (Vertex)" }, + { id: "zai-org/glm-5-maas", name: "GLM-5 (Vertex)" }, + ], }; diff --git a/open-sse/providers/registry/vertex.js b/open-sse/providers/registry/vertex.js index 07a2bcbe..89cc0279 100644 --- a/open-sse/providers/registry/vertex.js +++ b/open-sse/providers/registry/vertex.js @@ -1,44 +1,31 @@ - export default { - "id": "vertex", - "alias": "vertex", + id: "vertex", + alias: "vertex", + aliases: [ + "vx", + ], + uiAlias: "vx", display: { - "name": "Vertex AI", - "icon": "cloud", - "color": "#4285F4", - "textIcon": "VX", - "website": "https://cloud.google.com/vertex-ai", - "notice": { - "text": "New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.", - "apiKeyUrl": "https://console.cloud.google.com/iam-admin/serviceaccounts" - } + name: "Vertex AI", + icon: "cloud", + color: "#4285F4", + textIcon: "VX", + website: "https://cloud.google.com/vertex-ai", + notice: { + text: "New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.", + apiKeyUrl: "https://console.cloud.google.com/iam-admin/serviceaccounts", + }, }, category: "freeTier", - uiAlias: "vx", - aliases: ["vx"], - "transport": { - "baseUrl": "https://aiplatform.googleapis.com", - "format": "vertex" + transport: { + baseUrl: "https://aiplatform.googleapis.com", + format: "vertex", }, - media: { - serviceKinds: ["llm", "imageToText"] - }, - "models": [ - { - "id": "gemini-3.1-pro-preview", - "name": "Gemini 3.1 Pro Preview" - }, - { - "id": "gemini-3.1-flash-lite-preview", - "name": "Gemini 3.1 Flash Lite Preview" - }, - { - "id": "gemini-3-flash-preview", - "name": "Gemini 3 Flash Preview" - }, - { - "id": "gemini-2.5-flash", - "name": "Gemini 2.5 Flash" - } - ] + models: [ + { id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro Preview" }, + { id: "gemini-3.1-flash-lite-preview", name: "Gemini 3.1 Flash Lite Preview" }, + { id: "gemini-3-flash-preview", name: "Gemini 3 Flash Preview" }, + { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash" }, + ], + serviceKinds: ["llm","imageToText"], }; diff --git a/open-sse/providers/registry/volcengine-ark.js b/open-sse/providers/registry/volcengine-ark.js index e4af9013..1447258c 100644 --- a/open-sse/providers/registry/volcengine-ark.js +++ b/open-sse/providers/registry/volcengine-ark.js @@ -1,60 +1,34 @@ - export default { - "id": "volcengine-ark", - "alias": "volcengine-ark", + id: "volcengine-ark", + alias: "volcengine-ark", + aliases: [ + "ark", + ], + uiAlias: "ark", display: { - "name": "Volcengine Ark", - "icon": "cloud", - "color": "#1677FF", - "textIcon": "ARK", - "website": "https://ark.cn-beijing.volces.com", - "notice": { - "apiKeyUrl": "https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey" - } + name: "Volcengine Ark", + icon: "cloud", + color: "#1677FF", + textIcon: "ARK", + website: "https://ark.cn-beijing.volces.com", + notice: { + apiKeyUrl: "https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey", + }, }, category: "apikey", - uiAlias: "ark", - aliases: ["ark"], - "transport": { - "baseUrl": "https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions", - "headers": {} + transport: { + baseUrl: "https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions", + headers: {}, }, - "models": [ - { - "id": "Doubao-Seed-2.0-Code", - "name": "Doubao-Seed-2.0-Code" - }, - { - "id": "Doubao-Seed-2.0-pro", - "name": "Doubao-Seed-2.0-pro" - }, - { - "id": "Doubao-Seed-2.0-lite", - "name": "Doubao-Seed-2.0-lite" - }, - { - "id": "Doubao-Seed-Code", - "name": "Doubao-Seed-Code" - }, - { - "id": "DeepSeek-V4-Flash", - "name": "DeepSeek-V4-Flash" - }, - { - "id": "DeepSeek-V4-Pro", - "name": "DeepSeek-V4-Pro" - }, - { - "id": "GLM-5.1", - "name": "GLM-5.1" - }, - { - "id": "MiniMax-M2.7", - "name": "MiniMax-M2.7" - }, - { - "id": "Kimi-K2.6", - "name": "Kimi-K2.6" - } - ] + models: [ + { id: "Doubao-Seed-2.0-Code", name: "Doubao-Seed-2.0-Code" }, + { id: "Doubao-Seed-2.0-pro", name: "Doubao-Seed-2.0-pro" }, + { id: "Doubao-Seed-2.0-lite", name: "Doubao-Seed-2.0-lite" }, + { id: "Doubao-Seed-Code", name: "Doubao-Seed-Code" }, + { id: "DeepSeek-V4-Flash", name: "DeepSeek-V4-Flash" }, + { id: "DeepSeek-V4-Pro", name: "DeepSeek-V4-Pro" }, + { id: "GLM-5.1", name: "GLM-5.1" }, + { id: "MiniMax-M2.7", name: "MiniMax-M2.7" }, + { id: "Kimi-K2.6", name: "Kimi-K2.6" }, + ], }; diff --git a/open-sse/providers/registry/voyage-ai.js b/open-sse/providers/registry/voyage-ai.js index 8d976ea8..caaebc7e 100644 --- a/open-sse/providers/registry/voyage-ai.js +++ b/open-sse/providers/registry/voyage-ai.js @@ -1,60 +1,29 @@ - export default { - "id": "voyage-ai", - "alias": "voyage-ai", + id: "voyage-ai", + alias: "voyage-ai", + uiAlias: "voyage", display: { - "name": "Voyage AI", - "icon": "data_array", - "color": "#0EA5E9", - "textIcon": "VG", - "website": "https://www.voyageai.com", - "notice": { - "apiKeyUrl": "https://dash.voyageai.com/api-keys" - } + name: "Voyage AI", + icon: "data_array", + color: "#0EA5E9", + textIcon: "VG", + website: "https://www.voyageai.com", + notice: { + apiKeyUrl: "https://dash.voyageai.com/api-keys", + }, }, category: "apikey", - uiAlias: "voyage", authType: "apikey", - "transport": null, - media: { - serviceKinds: ["embedding"], - embeddingConfig: { baseUrl: "https://api.voyageai.com/v1/embeddings" } - }, - "models": [ - { - "id": "voyage-3-large", - "name": "Voyage 3 Large", - "type": "embedding" - }, - { - "id": "voyage-3.5", - "name": "Voyage 3.5", - "type": "embedding" - }, - { - "id": "voyage-3.5-lite", - "name": "Voyage 3.5 Lite", - "type": "embedding" - }, - { - "id": "voyage-code-3", - "name": "Voyage Code 3", - "type": "embedding" - }, - { - "id": "voyage-finance-2", - "name": "Voyage Finance 2", - "type": "embedding" - }, - { - "id": "voyage-law-2", - "name": "Voyage Law 2", - "type": "embedding" - }, - { - "id": "voyage-multilingual-2", - "name": "Voyage Multilingual 2", - "type": "embedding" - } - ] + transport: null, + models: [ + { id: "voyage-3-large", name: "Voyage 3 Large", kind: "embedding" }, + { id: "voyage-3.5", name: "Voyage 3.5", kind: "embedding" }, + { id: "voyage-3.5-lite", name: "Voyage 3.5 Lite", kind: "embedding" }, + { id: "voyage-code-3", name: "Voyage Code 3", kind: "embedding" }, + { id: "voyage-finance-2", name: "Voyage Finance 2", kind: "embedding" }, + { id: "voyage-law-2", name: "Voyage Law 2", kind: "embedding" }, + { id: "voyage-multilingual-2", name: "Voyage Multilingual 2", kind: "embedding" }, + ], + serviceKinds: ["embedding"], + embeddingConfig: { baseUrl: "https://api.voyageai.com/v1/embeddings" }, }; diff --git a/open-sse/providers/registry/xai.js b/open-sse/providers/registry/xai.js index d696e5cc..f83f20a8 100644 --- a/open-sse/providers/registry/xai.js +++ b/open-sse/providers/registry/xai.js @@ -1,60 +1,42 @@ - export default { - "id": "xai", - "alias": "xai", + id: "xai", + alias: "xai", display: { - "name": "xAI (Grok)", - "icon": "auto_awesome", - "color": "#1DA1F2", - "textIcon": "XA", - "website": "https://x.ai", - "notice": { - "apiKeyUrl": "https://console.x.ai" - } + name: "xAI (Grok)", + icon: "auto_awesome", + color: "#1DA1F2", + textIcon: "XA", + website: "https://x.ai", + notice: { + apiKeyUrl: "https://console.x.ai", + }, }, category: "apikey", + authModes: [ + "oauth", + "apikey", + ], hasOAuth: true, - authModes: ["oauth","apikey"], - "transport": { - "baseUrl": "https://api.x.ai/v1/chat/completions", - "validateUrl": "https://api.x.ai/v1/models", - "responsesUrl": "https://api.x.ai/v1/responses", - "clientId": "b1a00492-073a-47ea-816f-4c329264a828", - "tokenUrl": "https://auth.x.ai/oauth2/token", - "refreshUrl": "https://auth.x.ai/oauth2/token" + transport: { + baseUrl: "https://api.x.ai/v1/chat/completions", + validateUrl: "https://api.x.ai/v1/models", + responsesUrl: "https://api.x.ai/v1/responses", + clientId: "b1a00492-073a-47ea-816f-4c329264a828", + tokenUrl: "https://auth.x.ai/oauth2/token", + refreshUrl: "https://auth.x.ai/oauth2/token", }, - media: { - serviceKinds: ["llm", "imageToText", "webSearch", "image"], - searchViaChat: { defaultModel: "grok-4.20-reasoning", endpoint: "https://api.x.ai/v1/responses", pricingUrl: "https://x.ai/api#pricing" }, - imageConfig: { baseUrl: "https://api.x.ai/v1/images/generations", bodyFields: ["model", "prompt", "n", "response_format"] }, - authModes: ["oauth", "apikey"], - hasOAuth: true + models: [ + { id: "grok-4", name: "Grok 4" }, + { id: "grok-4-fast-reasoning", name: "Grok 4 Fast Reasoning" }, + { id: "grok-code-fast-1", name: "Grok Code Fast" }, + { id: "grok-3", name: "Grok 3" }, + { id: "grok-2-image-1212", name: "Grok 2 Image", params: ["n","response_format"], kind: "image" }, + ], + serviceKinds: ["llm","imageToText","webSearch","image"], + imageConfig: { baseUrl: "https://api.x.ai/v1/images/generations", bodyFields: ["model","prompt","n","response_format"] }, + searchViaChat: { + defaultModel: "grok-4.20-reasoning", + endpoint: "https://api.x.ai/v1/responses", + pricingUrl: "https://x.ai/api#pricing", }, - "models": [ - { - "id": "grok-4", - "name": "Grok 4" - }, - { - "id": "grok-4-fast-reasoning", - "name": "Grok 4 Fast Reasoning" - }, - { - "id": "grok-code-fast-1", - "name": "Grok Code Fast" - }, - { - "id": "grok-3", - "name": "Grok 3" - }, - { - "id": "grok-2-image-1212", - "name": "Grok 2 Image", - "type": "image", - "params": [ - "n", - "response_format" - ] - } - ] }; diff --git a/open-sse/providers/registry/xiaomi-mimo.js b/open-sse/providers/registry/xiaomi-mimo.js index c1b8b6d5..7cdd1ef9 100644 --- a/open-sse/providers/registry/xiaomi-mimo.js +++ b/open-sse/providers/registry/xiaomi-mimo.js @@ -1,40 +1,29 @@ - export default { - "id": "xiaomi-mimo", - "alias": "xiaomi-mimo", + id: "xiaomi-mimo", + alias: "xiaomi-mimo", + aliases: [ + "mimo", + ], + uiAlias: "mimo", display: { - "name": "Xiaomi MiMo", - "icon": "smart_toy", - "color": "#FF6900", - "textIcon": "XM", - "website": "https://xiaomimimo.com", - "notice": { - "apiKeyUrl": "https://xiaomimimo.com" - } + name: "Xiaomi MiMo", + icon: "smart_toy", + color: "#FF6900", + textIcon: "XM", + website: "https://xiaomimimo.com", + notice: { + apiKeyUrl: "https://xiaomimimo.com", + }, }, category: "apikey", - uiAlias: "mimo", - aliases: ["mimo"], - "transport": { - "baseUrl": "https://api.xiaomimimo.com/v1/chat/completions", - "validateUrl": "https://api.xiaomimimo.com/v1/models" + transport: { + baseUrl: "https://api.xiaomimimo.com/v1/chat/completions", + validateUrl: "https://api.xiaomimimo.com/v1/models", }, - "models": [ - { - "id": "mimo-v2.5-pro", - "name": "MiMo V2.5 Pro" - }, - { - "id": "mimo-v2.5", - "name": "MiMo V2.5" - }, - { - "id": "mimo-v2-omni", - "name": "MiMo V2 Omni" - }, - { - "id": "mimo-v2-flash", - "name": "MiMo V2 Flash" - } - ] + models: [ + { id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" }, + { id: "mimo-v2.5", name: "MiMo V2.5" }, + { id: "mimo-v2-omni", name: "MiMo V2 Omni" }, + { id: "mimo-v2-flash", name: "MiMo V2 Flash" }, + ], }; diff --git a/open-sse/providers/registry/xiaomi-tokenplan.js b/open-sse/providers/registry/xiaomi-tokenplan.js index 303db31d..a0f0a377 100644 --- a/open-sse/providers/registry/xiaomi-tokenplan.js +++ b/open-sse/providers/registry/xiaomi-tokenplan.js @@ -1,70 +1,42 @@ - export default { - "id": "xiaomi-tokenplan", - "alias": "xiaomi-tokenplan", + id: "xiaomi-tokenplan", + alias: "xiaomi-tokenplan", + aliases: [ + "xmtp", + ], + uiAlias: "xmtp", display: { - "name": "Xiaomi MiMo (Token Plan)", - "icon": "smart_toy", - "color": "#FF6700", - "textIcon": "XT", - "website": "https://mimo.xiaomi.com", - "notice": { - "text": "Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.", - "apiKeyUrl": "https://mimo.xiaomi.com" - } + name: "Xiaomi MiMo (Token Plan)", + icon: "smart_toy", + color: "#FF6700", + textIcon: "XT", + website: "https://mimo.xiaomi.com", + notice: { + text: "Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.", + apiKeyUrl: "https://mimo.xiaomi.com", + }, }, category: "apikey", - uiAlias: "xmtp", hasProviderSpecificData: true, defaultRegion: "sgp", - aliases: ["xmtp"], - "transport": { - "baseUrl": "https://token-plan-sgp.xiaomimimo.com/v1/chat/completions", + transport: { + baseUrl: "https://token-plan-sgp.xiaomimimo.com/v1/chat/completions", regions: { sgp: "https://token-plan-sgp.xiaomimimo.com/v1", cn: "https://token-plan-cn.xiaomimimo.com/v1", - ams: "https://token-plan-ams.xiaomimimo.com/v1" + ams: "https://token-plan-ams.xiaomimimo.com/v1", }, - defaultRegion: "sgp" + defaultRegion: "sgp", }, - "models": [ - { - "id": "mimo-v2.5-pro", - "name": "MiMo V2.5 Pro" - }, - { - "id": "mimo-v2.5-pro-claude", - "name": "MiMo V2.5 Pro (Claude Native)", - "targetFormat": "claude", - "upstreamModelId": "mimo-v2.5-pro" - }, - { - "id": "mimo-v2.5", - "name": "MiMo V2.5" - }, - { - "id": "mimo-v2-pro", - "name": "MiMo V2 Pro" - }, - { - "id": "mimo-v2-omni", - "name": "MiMo V2 Omni" - }, - { - "id": "mimo-v2-tts", - "name": "MiMo V2 TTS" - }, - { - "id": "mimo-v2.5-tts", - "name": "MiMo V2.5 TTS" - }, - { - "id": "mimo-v2.5-tts-voiceclone", - "name": "MiMo V2.5 TTS Voice Clone" - }, - { - "id": "mimo-v2.5-tts-voicedesign", - "name": "MiMo V2.5 TTS Voice Design" - } - ] + models: [ + { id: "mimo-v2.5-pro", name: "MiMo V2.5 Pro" }, + { id: "mimo-v2.5-pro-claude", name: "MiMo V2.5 Pro (Claude Native)", targetFormat: "claude", upstreamModelId: "mimo-v2.5-pro" }, + { id: "mimo-v2.5", name: "MiMo V2.5" }, + { id: "mimo-v2-pro", name: "MiMo V2 Pro" }, + { id: "mimo-v2-omni", name: "MiMo V2 Omni" }, + { id: "mimo-v2-tts", name: "MiMo V2 TTS" }, + { id: "mimo-v2.5-tts", name: "MiMo V2.5 TTS" }, + { id: "mimo-v2.5-tts-voiceclone", name: "MiMo V2.5 TTS Voice Clone" }, + { id: "mimo-v2.5-tts-voicedesign", name: "MiMo V2.5 TTS Voice Design" }, + ], }; diff --git a/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js b/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js index 5382f6f4..c8a183ef 100644 --- a/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +++ b/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js @@ -613,19 +613,20 @@ function TtsExampleCard({ providerId }) { - {/* Model selector — prefer ttsConfig.models, else providerModels via modelKey */} - {config.hasModelSelector && (config.modelKey || AI_PROVIDERS[providerId]?.ttsConfig?.models?.length) && ( + {/* Model selector — prefer PROVIDER_MODELS[kind=tts], else providerModels via modelKey */} + {config.hasModelSelector && (config.modelKey || getModelsByProviderId(providerId).some(m => (m.kind || m.type) === "tts")) && ( )} diff --git a/src/app/api/providers/[id]/test-models/route.js b/src/app/api/providers/[id]/test-models/route.js index 23aacabb..84946396 100644 --- a/src/app/api/providers/[id]/test-models/route.js +++ b/src/app/api/providers/[id]/test-models/route.js @@ -44,14 +44,14 @@ export async function POST(request, { params }) { // Warm up with first model to trigger token refresh (if needed) before parallel calls. // This prevents race condition where multiple requests concurrently refresh the same token. const [first, ...rest] = models; - const firstKind = first.type || "llm"; + const firstKind = first.kind || first.type || "llm"; const firstResult = await pingModelByKind(`${alias}/${first.id}`, firstKind, baseUrl); const results = [{ modelId: first.id, name: first.name || first.id, ...firstResult }]; if (rest.length > 0) { const restResults = await Promise.all( rest.map(async (model) => { - const result = await pingModelByKind(`${alias}/${model.id}`, model.type || "llm", baseUrl); + const result = await pingModelByKind(`${alias}/${model.id}`, model.kind || model.type || "llm", baseUrl); return { modelId: model.id, name: model.name || model.id, ...result }; }) ); diff --git a/src/app/api/providers/validate/route.js b/src/app/api/providers/validate/route.js index a32dd7de..cbab8d7b 100644 --- a/src/app/api/providers/validate/route.js +++ b/src/app/api/providers/validate/route.js @@ -75,7 +75,7 @@ async function probeMediaProvider(provider, apiKey) { const res = await fetch(cfg.baseUrl, { method, headers, - body: method === "GET" ? undefined : JSON.stringify({ input: "ping", text: "ping", prompt: "ping", model: cfg.models?.[0]?.id || "test" }), + body: method === "GET" ? undefined : JSON.stringify({ input: "ping", text: "ping", prompt: "ping", model: getDefaultModel(provider) || "test" }), signal: AbortSignal.timeout(8000), }); return res.status !== 401 && res.status !== 403; diff --git a/src/app/api/v1/models/info/route.js b/src/app/api/v1/models/info/route.js index 1993af96..11888437 100644 --- a/src/app/api/v1/models/info/route.js +++ b/src/app/api/v1/models/info/route.js @@ -52,21 +52,10 @@ function lookup(fullId) { const list = PROVIDER_MODELS[alias] || PROVIDER_MODELS[providerId] || []; const m = list.find((x) => x.id === modelId); if (m) { - const kind = m.type || "llm"; + const kind = m.kind || m.type || "llm"; return buildInfo({ alias, providerId, model: m, kind, providerInfo }); } - // Sub-configs (TTS/STT/embedding only-in-config) - const subs = [ - ["tts", providerInfo?.ttsConfig], - ["stt", providerInfo?.sttConfig], - ["embedding", providerInfo?.embeddingConfig], - ]; - for (const [kind, cfg] of subs) { - const sm = cfg?.models?.find((x) => x.id === modelId); - if (sm) return buildInfo({ alias, providerId, model: sm, kind, providerInfo }); - } - // Web search/fetch — virtual model id "search" / "fetch" if (modelId === "search" && providerInfo?.searchConfig) { return buildInfo({ diff --git a/src/app/api/v1/models/route.js b/src/app/api/v1/models/route.js index 59fa550e..af163633 100644 --- a/src/app/api/v1/models/route.js +++ b/src/app/api/v1/models/route.js @@ -59,8 +59,9 @@ const MODEL_TYPE_TO_KIND = { }; function modelKind(model) { - if (!model?.type) return LLM_KIND; - return MODEL_TYPE_TO_KIND[model.type] || LLM_KIND; + const k = model?.kind || model?.type; + if (!k) return LLM_KIND; + return MODEL_TYPE_TO_KIND[k] || LLM_KIND; } // For dynamic/unknown model IDs (compatible providers, alias map, custom models) @@ -360,29 +361,8 @@ export async function buildModelsList(kindFilter) { }); } - // Merge sub-config models (TTS / embedding) that live on AI_PROVIDERS, not PROVIDER_MODELS - const providerInfo = AI_PROVIDERS[providerId]; - const subConfigModels = []; - if (kindFilter.includes("tts") && Array.isArray(providerInfo?.ttsConfig?.models)) { - for (const m of providerInfo.ttsConfig.models) { - if (m?.id) subConfigModels.push(m.id); - } - } - if (kindFilter.includes("embedding") && Array.isArray(providerInfo?.embeddingConfig?.models)) { - for (const m of providerInfo.embeddingConfig.models) { - if (m?.id) subConfigModels.push(m.id); - } - } - for (const subId of subConfigModels) { - if (isDisabled(outputAlias, subId) || isDisabled(staticAlias, subId)) continue; - models.push({ - id: `${outputAlias}/${subId}`, - object: "model", - owned_by: outputAlias, - }); - } - // Web search/fetch — provider IS the model, expose as {alias}/search and/or {alias}/fetch with explicit kind + const providerInfo = AI_PROVIDERS[providerId]; if (kindFilter.includes("webSearch") && providerInfo?.searchConfig) { models.push({ id: `${outputAlias}/search`, diff --git a/src/shared/constants/providers.js b/src/shared/constants/providers.js index 6f6b9b29..6418a486 100644 --- a/src/shared/constants/providers.js +++ b/src/shared/constants/providers.js @@ -1,13 +1,26 @@ // Provider definitions import REGISTRY from "open-sse/providers/registry/index.js"; +const MEDIA_ENTRY_KEYS = [ + "serviceKinds", "ttsConfig", "sttConfig", "embeddingConfig", + "imageConfig", "imageToTextConfig", "videoConfig", "musicConfig", + "searchViaChat", "searchConfig", "fetchConfig", + "modelsFetcher", "mediaPriority", "hiddenKinds", +]; + // Build provider UI object from registry entry function buildProviderEntry(r) { + const mediaFields = {}; + // Support both legacy r.media wrapper and new flat top-level fields (post-migration) + if (r.media) Object.assign(mediaFields, r.media); + for (const k of MEDIA_ENTRY_KEYS) { + if (r[k] !== undefined) mediaFields[k] = r[k]; + } return { ...(r.display || {}), id: r.id, alias: r.uiAlias || r.alias, - ...(r.media || {}), + ...mediaFields, ...(r.thinkingConfig ? { thinkingConfig: r.thinkingConfig } : {}), ...(r.regions ? { regions: r.regions, defaultRegion: r.defaultRegion } : {}), ...(r.hasProviderSpecificData ? { hasProviderSpecificData: true } : {}), @@ -17,7 +30,6 @@ function buildProviderEntry(r) { ...(r.authModes ? { authModes: r.authModes } : {}), ...(r.authType ? { authType: r.authType } : {}), ...(r.authHint ? { authHint: r.authHint } : {}), - ...(r.hiddenKinds ? { hiddenKinds: r.hiddenKinds } : {}), }; }