Skip to content

feat(llms): add Atlas Cloud as an OpenAI-compatible LLM backend#1962

Open
lucaszhu-hue wants to merge 1 commit into
MemTensor:mainfrom
lucaszhu-hue:feat/add-atlascloud
Open

feat(llms): add Atlas Cloud as an OpenAI-compatible LLM backend#1962
lucaszhu-hue wants to merge 1 commit into
MemTensor:mainfrom
lucaszhu-hue:feat/add-atlascloud

Conversation

@lucaszhu-hue

Copy link
Copy Markdown

What

Adds Atlas Cloud as a first-class atlascloud LLM backend, alongside the existing openai, qwen, deepseek, and minimax providers.

Atlas Cloud exposes an OpenAI-compatible Chat Completions API, so this follows the exact same pattern already used for DeepSeek / Qwen / MiniMax:

  • AtlasCloudLLMConfig — subclass of OpenAILLMConfig, defaulting api_base to https://api.atlascloud.ai/v1
  • AtlasCloudLLM — subclass of OpenAILLM
  • registered as "atlascloud" in both LLMConfigFactory and LLMFactory
  • documented in the EN/CN model_backend guides

Why

It lets MemOS users point the existing LLM machinery at Atlas Cloud's hosted open models (DeepSeek, Qwen, Kimi, GLM, Llama, etc.) with a one-line backend= swap, no code changes elsewhere.

Usage

from memos.configs.llm import LLMConfigFactory
from memos.llms.factory import LLMFactory

cfg = LLMConfigFactory.model_validate({
    "backend": "atlascloud",
    "config": {
        "model_name_or_path": "deepseek-ai/DeepSeek-V3.1",
        "api_key": "<YOUR_ATLASCLOUD_API_KEY>",  # or read from env, e.g. os.environ["ATLASCLOUD_API_KEY"]
    },
})
llm = LLMFactory.from_config(cfg)
print(llm.generate([{"role": "user", "content": "Hello!"}]))

api_base defaults to https://api.atlascloud.ai/v1 and can be overridden like any other OpenAI-compatible backend.

Notes on the API key

The API key is passed through config exactly like the other OpenAI-compatible backends — nothing is hardcoded. Users supply their own key (commonly via the ATLASCLOUD_API_KEY environment variable).

Verification

  • python -m py_compile passes on all changed files.
  • Imported the factories in isolation and confirmed: atlascloud is registered in both LLMConfigFactory and LLMFactory, LLMConfigFactory.model_validate(...) produces an AtlasCloudLLMConfig with the correct default api_base, and AtlasCloudLLM is a subclass of OpenAILLM.

Happy to adjust naming/docs to match maintainer preferences. For any questions about the Atlas Cloud API you can also reach us at marketing@atlascloud.ai.

Add an `atlascloud` backend that talks to the Atlas Cloud
OpenAI-compatible Chat Completions API (https://api.atlascloud.ai/v1),
following the existing pattern used for `deepseek`, `qwen` and
`minimax`:

- AtlasCloudLLMConfig (subclass of OpenAILLMConfig) defaulting api_base
  to the Atlas Cloud endpoint
- AtlasCloudLLM (subclass of OpenAILLM)
- register `atlascloud` in both LLMConfigFactory and LLMFactory
- document the backend in the EN/CN model_backend guides

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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