Skip to content

feat(llm): add Atlas Cloud provider - #150

Merged
recabasic merged 2 commits into
CaviraOSS:mainfrom
binyangzhu000-sudo:feat/atlas-cloud-provider
Oct 7, 2026
Merged

recabasic merged 2 commits into
CaviraOSS:mainfrom
binyangzhu000-sudo:feat/atlas-cloud-provider

Conversation

@binyangzhu000-sudo

Copy link
Copy Markdown
Contributor

What this adds

atlascloud as an LLM provider for the Atlas Cloud gateway, following the cheaperinference / requesty shape — a 21-line module pointing ChatOpenAI at https://api.atlascloud.ai/v1:

Env var Default
ATLASCLOUD_API_KEY ''
ATLASCLOUD_MODEL deepseek-ai/DeepSeek-V3.1-Terminus
ATLASCLOUD_BASE_URL https://api.atlascloud.ai/v1

Disclosure: I work at Atlas Cloud. The model catalog at https://api.atlascloud.ai/v1/models is public and needs no key.

Embeddings

makeEmbeddings falls back to the OpenAI settings, and there is a comment saying why: Atlas Cloud serves chat completions only — POST /v1/embeddings returns 404 page not found, which I checked rather than assumed. That is the same thing cheaperinference.ts does, and .env.example notes it next to the key.

Testing

Provider tests: 6 files / 38 tests → 7 files / 42 tests, no failures. The new __tests__/atlascloud.test.ts mirrors cheaperinference.test.ts and adds one case for temperature / max-token pass-through.

$ npx vitest run backend/src/utils/llm/models/__tests__
baseline  Test Files  6 passed | 1 skipped (7)      Tests  38 passed | 3 skipped (41)
after     Test Files  7 passed | 1 skipped (8)      Tests  42 passed | 3 skipped (45)

$ npx vitest run              # whole suite
Test Files  8 passed | 1 skipped (9)   Tests  45 passed | 3 skipped (48)

$ npx tsc -p backend/tsconfig.json --noEmit
(clean)

Live round trip through the real provider and config, not a mock:

config.atlascloud_model = deepseek-ai/DeepSeek-V3.1-Terminus
config.atlascloud_base  = https://api.atlascloud.ai/v1

makeLLM(config).invoke(...)                              -> PageLM via Atlas Cloud OK
makeLLM({...config, atlascloud_model: 'zai-org/glm-4.7'}) -> 你好,世界。

The second call also shows ATLASCLOUD_MODEL switching models on the same key, which is the point of the gateway.

Files

backend/src/utils/llm/models/atlascloud.ts (new) · __tests__/atlascloud.test.ts (new) · models/index.ts (import + case) · config/env.ts (3 keys) · .env.example (provider list + its own section) · README.md (supported models line)

package-lock.json is deliberately not in the diff — npm install touched it locally, but nothing in this change adds a dependency.

🤖 Generated with Claude Code

binyangzhu000-sudo and others added 2 commits October 6, 2026 07:39
Adds `atlascloud` as an LLM provider, following the cheaperinference /
requesty shape for an OpenAI-compatible gateway: a 21-line module that
points ChatOpenAI at https://api.atlascloud.ai/v1, configured with
ATLASCLOUD_API_KEY / ATLASCLOUD_MODEL / ATLASCLOUD_BASE_URL.

Atlas Cloud serves chat completions only and has no /v1/embeddings
endpoint, so makeEmbeddings falls back to the OpenAI settings, which is
what the other chat-only gateways here already do.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
deepseek-ai/DeepSeek-V3.1-Terminus answered when this PR was opened and
now returns `400 not found` from the gateway, even though /v1/models
still lists it. Switched the default to deepseek-ai/deepseek-v4-flash
and the test's second model to zai-org/glm-5.3-flash, both re-checked
against the live API just now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
@recabasic
recabasic merged commit dfabf6d into CaviraOSS:main Oct 7, 2026
@Felixkw12 Felixkw12 mentioned this pull request Oct 8, 2026
2 of 17 tasks
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.

2 participants