Skip to content

feat(providers): add Atlas Cloud provider - #3943

Open
binyangzhu000-sudo wants to merge 1 commit into
chatboxai:mainfrom
binyangzhu000-sudo:feat/atlascloud-provider
Open

binyangzhu000-sudo wants to merge 1 commit into
chatboxai:mainfrom
binyangzhu000-sudo:feat/atlascloud-provider

Conversation

@binyangzhu000-sudo

Copy link
Copy Markdown

Summary

Adds Atlas Cloud as a built-in provider — an OpenAI-compatible gateway to 300+ models (OpenAI, Anthropic, DeepSeek, Qwen, GLM, Kimi, MiniMax, ...) behind one endpoint.

Followed docs/adding-new-provider.md and the existing SiliconFlow/Groq shape: a thin OpenAICompatible subclass with a fixed apiHost, registered through defineProvider().

Changes

  • src/shared/types/provider.ts — ModelProviderEnum.AtlasCloud
  • src/shared/providers/definitions/models/atlascloud.ts — the model class (OpenAICompatible subclass, apiHost: 'https://api.atlascloud.ai/v1')
  • src/shared/providers/definitions/atlascloud.ts — the defineProvider() call
  • src/shared/providers/builtin-registration.ts — the side-effect import (appended at the end, per the file's own "preserve this import order" comment)
  • src/shared/providers/index.contract.test.ts — extended the exact provider-order assertion (this is the registration-order contract test, not new coverage I added on top)
  • src/shared/models/index.ts — added the missing aiProviderNameHash entry. This is the legacy backward-compat map docs/adding-new-provider.md's "Migration Notes" say is superseded by defineProvider(), but tsc's exhaustive Record<ModelProviderEnum, string> check still requires every enum member to have one — npx tsc --noEmit catches this immediately if it's missing.
  • src/renderer/components/icons/ProviderIcon.tsx — the real Atlas Cloud logo mark, sourced from @lobehub/icons-static-svg (the icon set already backing several entries in this same file), same inline-<path> pattern as the SiliconFlow/Bedrock/xAI entries above it.

Curated model list (9 models) and their context/max-output numbers are taken from the live GET /v1/models catalog (2026-09-20), not guessed. Capability flags are conservative: tool_use is set on all of them (the OpenAI-origin models don't advertise it in supported_features, but they do support it in practice — verified live, see below); reasoning/vision are only set where the catalog's own supported_features/input_modalities actually say so.

No per-provider unit test file added — no sibling OpenAI-compatible provider (Groq, SiliconFlow, DeepSeek, ...) has one; the registry-order contract test is this codebase's real coverage mechanism for a new provider registration, and that's what's extended here.

Testing

  • npx biome lint — clean
  • npx vitest run src/shared/ src/renderer/utils src/renderer/components/icons — 1186 passed, 6 skipped (no regressions)
  • npx tsc --noEmit (full workspace) — 0 errors
  • Live, against the real gateway: createOpenAICompatible({ baseURL: 'https://api.atlascloud.ai/v1' }) + streamText() with the exact model-id shape this provider uses (openai/gpt-4.1-mini) — the same @ai-sdk/openai-compatible + ai package primitives AtlasCloud.getProvider()/getChatModel() call internally — returned a real streamed response with real token usage:
    [stream] "chatbox atlascloud ok"
    [usage] { inputTokens: 16, outputTokens: 5, totalTokens: 21, ... }
    

Disclosure: I work at Atlas Cloud.

Atlas Cloud is an OpenAI-compatible gateway to 300+ models (OpenAI,
Anthropic, DeepSeek, Qwen, GLM, Kimi, MiniMax, ...) behind one endpoint,
following the same shape as the existing SiliconFlow/Groq providers: a
thin OpenAICompatible subclass with a fixed apiHost, registered via
defineProvider() per docs/adding-new-provider.md.

Curated model list (9 models) plus their context/max-output numbers are
taken from the live GET /v1/models catalog (2026-09-20), not guessed.
Capability flags are conservative: tool_use is set for all of them
(the OpenAI-origin models don't advertise it in supported_features, but
real usage confirms they support it), reasoning/vision are only set
where the catalog's own supported_features/input_modalities say so.

Touches:
- types/provider.ts: ModelProviderEnum.AtlasCloud
- providers/definitions/models/atlascloud.ts: the model class
- providers/definitions/atlascloud.ts: the defineProvider() call
- providers/builtin-registration.ts: the side-effect import
- providers/index.contract.test.ts: extended the exact provider-order
  assertion (registration-order contract, not new coverage)
- models/index.ts: added the missing entry to aiProviderNameHash - this
  is the legacy backward-compat map the docs' migration notes say is
  superseded by defineProvider(), but tsc's exhaustive
  Record<ModelProviderEnum, string> check still requires every enum
  member to have one
- components/icons/ProviderIcon.tsx: the real Atlas Cloud logo mark
  (sourced from @lobehub/icons-static-svg, the same icon set already
  used elsewhere in this file), same inline-<path> pattern as the
  SiliconFlow/Bedrock/xAI entries above it

No per-provider unit test file added: no sibling OpenAI-compatible
provider (Groq, SiliconFlow, DeepSeek, ...) has one either - the
registry-order contract test is this codebase's actual coverage
mechanism for a new provider registration, which is what's extended
here.

Verified:
- npx biome lint: clean
- npx vitest run src/shared/ src/renderer/utils src/renderer/components/icons:
  1186 passed, 6 skipped (no regressions)
- npx tsc --noEmit (full workspace, node --max-old-space-size=8192):
  0 errors
- Live, against the real gateway: createOpenAICompatible() +
  streamText() with the exact baseURL/model-id shape this provider
  uses (openai/gpt-4.1-mini) returned a real streamed response with
  real token usage - the same @ai-sdk/openai-compatible + ai package
  primitives AtlasCloud.getProvider()/getChatModel() call internally.
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 7ad9a166-4f50-403a-ae81-5d551132fd7b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant