From 64dc56432ea9c238e24ac9aa2e621dd9ee45c23b Mon Sep 17 00:00:00 2001 From: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com> Date: Fri, 9 Oct 2026 22:37:43 +0800 Subject: [PATCH] feat: add Atlas Cloud as an LLM provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Registers Atlas Cloud (an OpenAI-compatible LLM gateway at api.atlascloud.ai) as a built-in provider, alongside the existing generic-gateway entries (OpenRouter, Cheaper Inference, api-route, …). - src/main/provider/defaults.ts: new DEFAULT_PROVIDERS entry. - src/main/provider/providerRegistry.ts: new registry definition reusing OPENAI_BASE with credentialStrategy: 'api-key' and embeddingStrategy: 'none' (the catalog has no embedding models), matching the cheaper-inference/api-route shape rather than openrouter's (no router-style model-id-prefix handling applies, since Atlas Cloud's model ids are already lab-prefixed). - src/renderer/src/assets/llm-icons/atlascloud.svg + modelIconRegistry.ts: new icon, registered in both the icon map and monoIconUrls (it's a single-color mark, like OpenRouter's). No changes needed in aiSdkProvider.ts/providerFactory.ts: the provider id doesn't match any special-cased router (openrouter/ zenmux), so it goes through the generic createOpenAICompatible path already used by every other plain openai-completions gateway. Verified with pnpm run typecheck (node + web), oxlint, oxfmt, the existing provider unit tests (test/main/provider/*, 85 passed), and a live chat completion + /v1/models discovery call through the exact createOpenAICompatible construction providerFactory.ts uses for this code path. Co-Authored-By: Claude Sonnet 5 Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com> --- src/main/provider/defaults.ts | 14 ++++++++++++++ src/main/provider/providerRegistry.ts | 8 ++++++++ src/renderer/src/assets/llm-icons/atlascloud.svg | 1 + .../src/components/icons/modelIconRegistry.ts | 3 +++ 4 files changed, 26 insertions(+) create mode 100644 src/renderer/src/assets/llm-icons/atlascloud.svg diff --git a/src/main/provider/defaults.ts b/src/main/provider/defaults.ts index f13773993..92589dc0c 100644 --- a/src/main/provider/defaults.ts +++ b/src/main/provider/defaults.ts @@ -566,6 +566,20 @@ const PROVIDER_DEFAULTS: LLM_PROVIDER_BASE[] = [ models: 'https://openrouter.ai/docs/models' } }, + { + id: 'atlascloud', + name: 'Atlas Cloud', + apiType: 'openai-completions', + apiKey: '', + baseUrl: 'https://api.atlascloud.ai/v1', + enable: false, + websites: { + official: 'https://atlascloud.ai/', + apiKey: 'https://console.atlascloud.ai/api-keys', + docs: 'https://docs.atlascloud.ai/', + models: 'https://console.atlascloud.ai/models' + } + }, { id: 'requesty', name: 'Requesty', diff --git a/src/main/provider/providerRegistry.ts b/src/main/provider/providerRegistry.ts index 2ad76a69d..053f35a90 100644 --- a/src/main/provider/providerRegistry.ts +++ b/src/main/provider/providerRegistry.ts @@ -168,6 +168,14 @@ const PROVIDER_ID_REGISTRY = new Map([ embeddingStrategy: 'none' }) ], + [ + 'atlascloud', + createDefinition({ + ...OPENAI_BASE, + credentialStrategy: 'api-key', + embeddingStrategy: 'none' + }) + ], [ 'amd-developer', createDefinition({ diff --git a/src/renderer/src/assets/llm-icons/atlascloud.svg b/src/renderer/src/assets/llm-icons/atlascloud.svg new file mode 100644 index 000000000..d9e7da2f8 --- /dev/null +++ b/src/renderer/src/assets/llm-icons/atlascloud.svg @@ -0,0 +1 @@ +Atlas Cloud diff --git a/src/renderer/src/components/icons/modelIconRegistry.ts b/src/renderer/src/components/icons/modelIconRegistry.ts index 92ab979bc..747ee8366 100644 --- a/src/renderer/src/components/icons/modelIconRegistry.ts +++ b/src/renderer/src/components/icons/modelIconRegistry.ts @@ -49,6 +49,7 @@ import daoxeColorIcon from '@/assets/llm-icons/daoxe.png?url' import kimiColorIcon from '@/assets/llm-icons/kimi-color.svg?url' import moonshotColorIcon from '@/assets/llm-icons/moonshot.svg?url' import openrouterColorIcon from '@/assets/llm-icons/openrouter.svg?url' +import atlascloudIcon from '@/assets/llm-icons/atlascloud.svg?url' import requestyColorIcon from '@/assets/llm-icons/requesty.png?url' import opperColorIcon from '@/assets/llm-icons/opper.svg?url' import demonrouteColorIcon from '@/assets/llm-icons/demonroute.svg?url' @@ -188,6 +189,7 @@ export const modelIcons = { qwen: qwenColorIcon, moonshot: moonshotColorIcon, openrouter: openrouterColorIcon, + atlascloud: atlascloudIcon, requesty: requestyColorIcon, opper: opperColorIcon, demonroute: demonrouteColorIcon, @@ -269,6 +271,7 @@ const monoIconUrls = new Set([ rwkvColorIcon, moonshotColorIcon, openrouterColorIcon, + atlascloudIcon, opperColorIcon, demonrouteColorIcon, githubColorIcon,