Skip to content

[feat] providers: add Atlas Cloud chat provider preset - #293

Merged
kunkunblueberry merged 1 commit into
ThinkFlowLab:mainfrom
binyangzhu000-sudo:add-atlascloud-provider
Nov 17, 2026
Merged

kunkunblueberry merged 1 commit into
ThinkFlowLab:mainfrom
binyangzhu000-sudo:add-atlascloud-provider

Conversation

@binyangzhu000-sudo

Copy link
Copy Markdown
Contributor

Summary

  • Add Atlas Cloud as a named agent chat provider preset (https://api.atlascloud.ai/v1, OpenAI-compatible Chat Completions, bearer key from https://console.atlascloud.ai/api-keys). It mirrors the Zhipu preset from [feat] providers: add Zhipu BigModel GLM chat support #245 and the DeepSeek preset, except that it ships no fixed model list: the gateway has a public /v1/models endpoint, so the existing provider form discovery lists the models.
  • The preset is chat only (kinds: ["agent"]). Atlas Cloud's image and video models use their own request protocol rather than the OpenAI-compatible one the preset system maps to protocol: "openai", so they are intentionally not registered here.
  • In chat_payload, the shared thinking setting sends reasoning_effort for api.atlascloud.ai only at high. The gateway fronts several model families and some (for example qwen/qwen3.5-flash) answer 400 to low and medium (measured), while high is accepted everywhere. auto, low and medium use the model default. Other hosts are unchanged.

Disclosure: I work at Atlas Cloud.

Files:

  • src/canvas/providerPresets.ts: new atlascloud preset. The brand name is the same in both languages, so no EN_NAMES entry is needed; no logo is set because the logo set is per model vendor and per-model logos still resolve from the org/model ids.
  • packages/core/src/opendirector/integrations/chat_completions.py: host branch for reasoning_effort.
  • tests/providerPresets.test.ts: preset shape, label in both display languages, saved connection identity.
  • tests/test_atlascloud.py: effort mapping and unchanged base fields and other hosts.
  • docs/development/validation.md: validation commands and the real-credential boundary.

Linked issue

No issue applies. This is a small provider preset addition and there is no open request for it.

  • Fixes #N or Refs #N is included, or no issue applies

Labels

I cannot set labels from a fork. Suggested: type:feat, area:provider, area:agent.

  • Labels applied (maintainer, please)

Test plan

  • Local:
    • node --test tests/providerPresets.test.ts: 14 passed, 0 failed
    • npm test: 769 passed, 0 failed
    • npm run build: passed
    • npm run check:i18n: 3002 keys, 0 problems
    • .venv/bin/python -m pytest tests/test_atlascloud.py tests/test_zhipu.py tests/test_model_configs.py -q: 39 passed
    • .venv/bin/python -m pytest tests -q: 141 failed, 1388 passed, 130 skipped, 58 errors with this change; 141 failed, 1386 passed, 130 skipped, 58 errors on clean main (0bdc3a7). The failing and erroring test ids are identical, so none are new. They fail in my local macOS environment without this change.
    • .venv/bin/lint-imports and scripts/generate_contracts.py --check: passed
  • Left to CI: Release checks.
  • Not run: the browser suite (npm run test:browser) and a browser case for this preset. The change adds no UI code beyond a preset entry; I did not click through the provider form in a browser.

Evidence that it works

No UI was changed beyond a new entry in the provider list, and I did not capture screenshots. Terminal output of the live check through the repository's own code (read_service_models for model discovery and ChatCompletions.stream with chat_payload):

models: 136 has deepseek-v4-flash: True
level auto reasoning_effort: None
  reply: 'pong' thinking_events: True
level high reasoning_effort: high
  reply: 'pong' thinking_events: True
qwen/qwen3.5-flash, thinking=medium, effort sent: None -> 'Pong! ...' (stream completed)
  • Media attached, or N/A because: no UI change beyond a provider list entry; the terminal output of the live check is above. Screenshots of the form are not included.

Provider verification

Real calls were made to https://api.atlascloud.ai/v1 with a test key supplied through an environment variable. The key is not in any file, test or fixture; the unit tests use no network.

  • Verified live: model discovery through the repo's read_service_models (136 models), and streamed chat completions through ChatCompletions.stream with deepseek-ai/deepseek-v4-flash (thinking auto and high) and qwen/qwen3.5-flash (thinking medium).

  • Measured separately by direct requests while designing the mapping: qwen/qwen3.5-flash returns 400 for reasoning_effort low, medium and max and 200 for high; deepseek-ai/deepseek-v4-flash, zai-org/glm-5.3-flash and moonshotai/kimi-k3 accept low, medium, high and max.

  • Not verified: tool calling through the assistant on Atlas Cloud, image input for chat, and the provider form in a browser.

  • Real-provider calls are described honestly, or none were made

Bilingual UI

The only user-facing string is the proper noun "Atlas Cloud", identical in zh-CN and en-US; a test checks both locales.

  • Both locales are updated, or no user-facing copy changed

🤖 Generated with Claude Code

@github-actions github-actions Bot added area:provider Model providers and generation protocols type:feat New capability or behaviour labels Nov 11, 2026

@kunkunblueberry kunkunblueberry left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the full diff (5 files, +83/−0). Approved.

What I checked:

  • integrations/chat_completions.py:25-29 — the new elif hostname == "api.atlascloud.ai" branch only sends reasoning_effort for high, and the generic branch below still handles every other host. Placing it before the generic branch is correct, and auto sending nothing matches the existing DeepSeek semantics.
  • src/canvas/providerPresets.ts:134-142 — preset shape matches its neighbours (protocol: openai, connectionType: api, authMode: bearer, kinds: ["agent"], no modelsByKind so it discovers from /v1/models).
  • tests/test_atlascloud.py — behaviourally useful: it pins that auto/low/medium send no reasoning_effort while high does, and that an unrelated host keeps the old behaviour. That negative case is the part that would otherwise regress silently.
  • tests/providerPresets.test.ts — asserts the preset is offered only for agent and that a saved connection reopens as atlascloud, plus the providerPresetFor fallback to custom for a different URL.
  • docs/development/validation.md — the new section states what the checks do and do not cover (no network, real streaming needs a key). Accurate.

Two non-blocking notes, no action needed for this PR:

  1. The preset omits logoOrganization, which most presets set. The provider will render without a brand mark. Cosmetic, but if a Lobe organisation id exists for Atlas Cloud it is a one-line addition.
  2. The hostname branch is the second host-specific special case in chat_payload. Two is still readable; if a third arrives, the mapping belongs in a table ({host: {level: effort}}) rather than another elif. Recording it so the third one does not have to rediscover that.

Landed: /v1/models discovery means the preset carries no model list, which is the right call for a gateway that fronts several families — a pinned list would go stale, and the reason only high is sent is exactly that the families disagree.

@FayeSpica FayeSpica mentioned this pull request Nov 16, 2026
3 of 10 tasks
@FayeSpica

Copy link
Copy Markdown
Collaborator

please resolve conflicts

Register Atlas Cloud (https://api.atlascloud.ai/v1), an OpenAI-compatible
gateway, as an agent chat provider preset, mirroring the Zhipu and DeepSeek
presets. Models come from the gateway's public /v1/models endpoint through the
existing discovery flow, so no fixed model list is shipped.

The gateway fronts several model families and some of them (Qwen) answer 400
to reasoning_effort low and medium, while high is accepted everywhere. For this
host the shared thinking setting sends reasoning_effort only for high; auto,
low and medium use the model default. Other hosts are unchanged.

Adds node tests for the preset shape, the label in both display languages and
the saved connection identity, Python tests for the effort mapping, and the
validation commands in the validation guide.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
@github-actions github-actions Bot added the area:agent Agent runtime, assistant chat and tools label Nov 17, 2026
@github-actions
github-actions Bot requested a review from wuzhf9 November 17, 2026 13:57
@kunkunblueberry

Copy link
Copy Markdown
Collaborator

Rebased onto main (ec205d1e) and pushed to your branch as d3f4a739. GitHub now reports MERGEABLE, and I approved the new CI runs.

I force-pushed once, with --force-with-lease pinned to c2ddd467, so nothing of yours was overwritten beyond the rebase. If you would rather re-do it yourself, the two resolutions are below and you can drop my commit.

What conflicted, and how

Both conflicts were "main and this branch each appended a preset / a section at the same place" — no semantic disagreement, so I kept both sides.

src/canvas/providerPresets.ts. main had gained bailian-beijing, kimi and kimi-coding between minimax-video and zhipu, and git could not tell where my atlascloud entry began. My first automated attempt produced a mangled block (a duplicated trailing protocol/connectionType/authMode trio and the atlascloud entry missing its opening {), so I rewrote that region by hand rather than trusting the merge. The result keeps every main preset untouched and inserts:

  {
    id: "atlascloud",
    name: "Atlas Cloud",
    kinds: ["agent"],
    url: "https://api.atlascloud.ai/v1",
    protocol: "openai",
    connectionType: "api",
    authMode: "bearer",
  },

between kimi-coding and zhipu.

docs/development/validation.md. main had added a 智谱 BigModel GLM-TTS section right where this branch adds the Atlas Cloud section. Kept both: GLM-TTS first, then Atlas Cloud, then the existing ### Voice library heading. I also removed one stray blank line my join introduced.

Verification on the rebased tree

  • tests/test_atlascloud.py: 2 passed.
  • tests/providerPresets.test.ts: 23 passed, including the four preset cases this PR adds.
  • src/i18n/messages/{zh-CN,en-US}/models.ts: key sets identical, 114 each.
  • Diff is still exactly your five files, +82/−0 — the rebase added no unrelated change and dropped none of your work.
  • git merge-tree --write-tree origin/main d3f4a739 is clean; 0 commits behind.

One note for anyone running the Python test locally: this repository is installed editable, so import opendirector resolves to the main checkout unless PYTHONPATH=packages/core/src is set. Without it the test imports chat_payload from main, where the Atlas Cloud branch does not exist yet, and fails with reasoning_effort present at low. That is a stale-import artefact, not a defect in the change — it passes with the path set, and CI installs from the branch so it is unaffected.

I will merge once the run finishes green.

@kunkunblueberry
kunkunblueberry merged commit 4360d9e into ThinkFlowLab:main Nov 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Agent runtime, assistant chat and tools area:provider Model providers and generation protocols type:feat New capability or behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants