Skip to content

feat: add Atlas Cloud as an LLM provider - #332

Open
binyangzhu000-sudo wants to merge 2 commits into
AmoyLab:mainfrom
binyangzhu000-sudo:feat/atlascloud-provider
Open

binyangzhu000-sudo wants to merge 2 commits into
AmoyLab:mainfrom
binyangzhu000-sudo:feat/atlascloud-provider

Conversation

@binyangzhu000-sudo

@binyangzhu000-sudo binyangzhu000-sudo commented Sep 28, 2026 •

Copy link
Copy Markdown

What & Why

Adds Atlas Cloud as a new LLM provider, in the same category as the existing OpenRouter provider. Atlas Cloud is an OpenAI-compatible gateway to 100+ LLMs from a single endpoint (https://api.atlascloud.ai/v1), identified by vendor/model ids (e.g. openai/gpt-4.1-mini, anthropic/claude-sonnet-4.6, deepseek-ai/deepseek-v3.2).

Disclosure: I work at Atlas Cloud.

Implementation notes

This repo has two directories that both carry per-provider files named e.g. openrouter.ts:

  • web/src/config/ai-models/ (51 files) — a static model-metadata catalog. Nothing under web/src actually imports this directory.
  • web/src/config/llm-providers/ — the real ModelProviderCard registry. DEFAULT_MODEL_PROVIDER_LIST is built from it, and llm-providers-adapter.ts's getDefaultBaseURL()/getProviderTemplate() (which read from this list) are what services/llm-chat.ts actually calls to build the real fetch() request to /chat/completions.

This PR only touches the second one, which is the one that matters for a working integration:

  • web/src/config/llm-providers/atlascloud.ts (new): a ModelProviderCard mirroring groq.ts's shape (no special disableBrowserRequest, unlike OpenRouter), listing 9 models with real context-window values pulled from Atlas Cloud's own /v1/models catalog.
  • web/src/config/llm-providers/index.ts: import + added to DEFAULT_MODEL_PROVIDER_LIST (next to OpenRouterProvider) + card re-export.
  • web/src/config/llm-providers-adapter.ts: getDefaultBaseURL() and getDefaultCheckModel() each got one entry.

Testing

$ pnpm run build   # tsc && vite build
✓ built in 2.44s

$ pnpm run lint    # eslint . --ext ts,tsx --max-warnings 0
(no errors)

(This project has no unit test suite.)

Manual test — a real call to the exact endpoint this config resolves to:

$ curl -X POST https://api.atlascloud.ai/v1/chat/completions \
    -H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
    -d '{"model":"openai/gpt-4.1-mini","messages":[{"role":"user","content":"Reply with exactly: UNLA_ATLASCLOUD_OK"}]}'
# {"choices":[{"message":{"content":"UNLA_ATLASCLOUD_OK", ...

🤖 Generated with Claude Code

Summary by Sourcery

Add Atlas Cloud to the available LLM providers and expose its supported models through the provider registry.

New Features:

  • Add Atlas Cloud as an OpenAI-compatible LLM provider with access to nine configured models.

Enhancements:

  • Register Atlas Cloud’s API endpoint and default validation model for request construction and provider checks.

Atlas Cloud (https://www.atlascloud.ai/) is an OpenAI-compatible
gateway to 100+ LLMs from a single endpoint, in the same category as
the existing OpenRouter provider. Registered in
web/src/config/llm-providers/ (the ModelProviderCard registry that
DEFAULT_MODEL_PROVIDER_LIST/getDefaultBaseURL actually feed into
services/llm-chat.ts's real fetch() calls) — not the separate
web/src/config/ai-models/ directory, which carries the same provider
names but isn't consumed anywhere in web/src.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
@sourcery-ai

sourcery-ai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR integrates Atlas Cloud as a first-class LLM provider by adding an OpenAI-compatible provider card, registering nine catalog models, and wiring its API endpoint and default check model into the provider adapter; build and lint reportedly pass, with an additional successful manual chat-completion request.

Sequence diagram for an Atlas Cloud chat completion

sequenceDiagram
    participant Chat as Chat service
    participant Adapter as LLM provider adapter
    participant Atlas as Atlas Cloud API

    Chat->>Adapter: getDefaultBaseURL(atlascloud)
    Adapter-->>Chat: https://api.atlascloud.ai/v1
    Chat->>Atlas: POST /chat/completions with model openai/gpt-4.1-mini
    Atlas-->>Chat: Chat completion response
Loading

File-Level Changes

Change Details Files
Add Atlas Cloud as an OpenAI-compatible provider with its endpoint, default validation model, and supported model catalog.
  • Define nine enabled chat models with provider-specific IDs, context windows, function-calling support, and vision capability where applicable.
  • Configure the Atlas Cloud base URL and default check model used for request construction and provider validation.
  • Register and re-export the provider card in the default provider registry.
web/src/config/llm-providers/atlascloud.ts
web/src/config/llm-providers-adapter.ts
web/src/config/llm-providers/index.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="web/src/config/llm-providers/atlascloud.ts" line_range="85" />
<code_context>
+    'Atlas Cloud 是一个 OpenAI 兼容的统一网关,通过单一 API 接入 100+ 大语言模型,涵盖 OpenAI、Anthropic、DeepSeek、Qwen、Z.AI、Moonshot、MiniMax 等厂商,模型 ID 采用 `vendor/model` 格式。',
+  id: 'atlascloud',
+  modelList: { showModelFetcher: true },
+  modelsUrl: 'https://www.atlascloud.ai/',
+  name: 'Atlas Cloud',
+  proxyUrl: {
</code_context>
<issue_to_address>
**nitpick:** The Atlas Cloud provider's model documentation link opens the provider homepage rather than a model catalog or model documentation page, so the UI's “view models” link does not take users to the advertised model information.

**Suggested fix:** Point `modelsUrl` to Atlas Cloud's actual model catalog or API documentation URL.

```suggestion
  modelsUrl: 'https://www.atlascloud.ai/models',
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread web/src/config/llm-providers/atlascloud.ts Outdated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
@binyangzhu000-sudo

Copy link
Copy Markdown
Author

Thanks for the review, Sourcery. Verified against the current code: modelsUrl pointed at the Atlas Cloud homepage, so the "view models" link didn't land on a catalog. Fixed in the latest commit by pointing it to https://www.atlascloud.ai/models (this URL returned HTTP 200 when I checked). This is a one-line string change; I did not re-run the full build/lint locally for it.

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