Repository navigation
feat: add Atlas Cloud as an LLM provider - #2421
Conversation
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 <noreply@anthropic.com> Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAtlas Cloud is added as a disabled-by-default OpenAI-compatible provider that requires an API key. Its icon is registered in the renderer and included in the monochrome icon URL set. ChangesAtlas Cloud provider support
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Feature Suggested reviewers:
|
zerob13
left a comment
There was a problem hiding this comment.
Review: add Atlas Cloud as an LLM provider
Verdict: Request changes — for one specific gap described below. The change itself is correct and safe; I've also approved the two pending CI workflows (first-time contributor) so checks run in parallel with this feedback.
What it does
Registers Atlas Cloud as a built-in OpenAI-compatible provider (https://api.atlascloud.ai/v1), disabled by default, no baked-in key, with an icon. Verified: the API endpoint answers (/v1/models returns 200), all four website links resolve, and the entry matches the shape of the neighboring providers. The monochrome icon is correctly registered in modelIcons and the monoIconUrls set.
The one thing to add: a registration test
The last three provider PRs in this repo each shipped a contract test alongside the entry:
- Magpie (#2414) — discovery + capability-mapping tests in
test/main/provider/basicApiKeyProviders.test.tsandproviderDbModelConfig.test.ts - Opper (#2417) — discovery test +
defaultProviders.test.tspresence test - AstrLink (#2418) — discovery/401 test in
basicApiKeyProviders.test.ts
This PR adds none. Provider registration is a documented contract in this repo (that's why those tests exist for every sibling), so please add at minimum a defaultProviders.test.ts presence test asserting the atlascloud defaults (id, baseUrl, enable: false, websites), and ideally a basicApiKeyProviders.test.ts discovery test following the Opper/AstrLink pattern (mock /v1/models, assert fetch-models check strategy and Bearer auth).
Everything else is fine
- Entry shape identical to neighbors;
OPENAI_BASE+api-key+embeddingStrategy: 'none'is the conservative choice used by the other gateway entries. - Purely additive, no i18n copy, no breaking changes.
- Icon handling correct.
Once the test lands, this is an approve from me. For maintainers: Atlas Cloud is a third-party commercial GPU-cloud service — same built-in-catalog policy question as #2407/#2408/#2417/#2418; the author appears to be affiliated with Atlas Cloud, so that's worth weighing.
Summary
Adds Atlas Cloud (
https://api.atlascloud.ai/v1) as a built-in provider, alongside the existing generic-gateway entries (OpenRouter, Cheaper Inference, api-route, Requesty, …). Atlas Cloud is an OpenAI-compatible LLM gateway exposing DeepSeek, Z.ai, Moonshot, Qwen and other models behind a single API key.Disclosure: I work at Atlas Cloud. This adds it as one more provider option; it doesn't change any default, remove anything, or touch the curated "popular providers" onboarding list on the welcome screen.
Changes
src/main/provider/defaults.ts: newDEFAULT_PROVIDERSentry.src/main/provider/providerRegistry.ts: new registry definition reusingOPENAI_BASEwithcredentialStrategy: 'api-key'andembeddingStrategy: 'none'(the catalog has no embedding models) — same shape ascheaper-inference/api-route, notopenrouter's (no router-style model-id-prefix handling applies, since Atlas Cloud's model ids are already lab-prefixed, e.g.deepseek-ai/deepseek-v4-flash).src/renderer/src/assets/llm-icons/atlascloud.svg+modelIconRegistry.ts: new icon, registered in both the icon map andmonoIconUrls(it's a single-color mark, like OpenRouter's).aiSdkProvider.ts/providerFactory.ts: the provider id doesn't match either special-cased router (openrouter/zenmux), so it goes through the genericcreateOpenAICompatiblepath already used by every other plainopenai-completionsgateway.Test plan
pnpm run typecheck(node + web) — 0 errorsoxlinton the changed files — 0 errorsoxfmt --checkon the changed files — correctly formattedtest/main/provider/*) — 85 passed, same as before this changecreateOpenAICompatibleconstructionproviderFactory.tsbuilds for this code path (samename/baseURL/includeUsageshape) against the real Atlas Cloud gateway: got back a correct chat completion, and confirmed/v1/modelsdiscovery (117 models) with the same Bearer-auth shapecheckStrategy: 'fetch-models'uses🤖 Generated with Claude Code
Summary by CodeRabbit