Repository navigation
[feat] providers: add Atlas Cloud chat provider preset - #293
kunkunblueberry merged 1 commit into
Conversation
kunkunblueberry
left a comment
There was a problem hiding this comment.
Reviewed the full diff (5 files, +83/−0). Approved.
What I checked:
integrations/chat_completions.py:25-29— the newelif hostname == "api.atlascloud.ai"branch only sendsreasoning_effortforhigh, and the generic branch below still handles every other host. Placing it before the generic branch is correct, andautosending 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"], nomodelsByKindso it discovers from/v1/models).tests/test_atlascloud.py— behaviourally useful: it pins thatauto/low/mediumsend noreasoning_effortwhilehighdoes, 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 foragentand that a saved connection reopens asatlascloud, plus theproviderPresetForfallback tocustomfor 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:
- 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. - 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 anotherelif. 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.
|
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>
c2ddd46 to
d3f4a73
Compare
|
Rebased onto I force-pushed once, with What conflicted, and howBoth conflicts were "main and this branch each appended a preset / a section at the same place" — no semantic disagreement, so I kept both sides.
{
id: "atlascloud",
name: "Atlas Cloud",
kinds: ["agent"],
url: "https://api.atlascloud.ai/v1",
protocol: "openai",
connectionType: "api",
authMode: "bearer",
},between
Verification on the rebased tree
One note for anyone running the Python test locally: this repository is installed editable, so I will merge once the run finishes green. |
Summary
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/modelsendpoint, so the existing provider form discovery lists the models.kinds: ["agent"]). Atlas Cloud's image and video models use their own request protocol rather than the OpenAI-compatible one the preset system maps toprotocol: "openai", so they are intentionally not registered here.chat_payload, the shared thinking setting sendsreasoning_effortforapi.atlascloud.aionly athigh. The gateway fronts several model families and some (for exampleqwen/qwen3.5-flash) answer 400 tolowandmedium(measured), whilehighis accepted everywhere.auto,lowandmediumuse the model default. Other hosts are unchanged.Disclosure: I work at Atlas Cloud.
Files:
src/canvas/providerPresets.ts: newatlascloudpreset. The brand name is the same in both languages, so noEN_NAMESentry is needed; no logo is set because the logo set is per model vendor and per-model logos still resolve from theorg/modelids.packages/core/src/opendirector/integrations/chat_completions.py: host branch forreasoning_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 #NorRefs #Nis included, or no issue appliesLabels
I cannot set labels from a fork. Suggested:
type:feat,area:provider,area:agent.Test plan
node --test tests/providerPresets.test.ts: 14 passed, 0 failednpm test: 769 passed, 0 failednpm run build: passednpm 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-importsandscripts/generate_contracts.py --check: passednpm 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_modelsfor model discovery andChatCompletions.streamwithchat_payload):Provider verification
Real calls were made to
https://api.atlascloud.ai/v1with 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 throughChatCompletions.streamwithdeepseek-ai/deepseek-v4-flash(thinking auto and high) andqwen/qwen3.5-flash(thinking medium).Measured separately by direct requests while designing the mapping:
qwen/qwen3.5-flashreturns 400 forreasoning_effortlow, medium and max and 200 for high;deepseek-ai/deepseek-v4-flash,zai-org/glm-5.3-flashandmoonshotai/kimi-k3accept 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-CNanden-US; a test checks both locales.🤖 Generated with Claude Code