Skip to content

feat: add Atlas Cloud provider - #113

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

feat: add Atlas Cloud provider#113
binyangzhu000-sudo wants to merge 2 commits into
yeahhe365:mainfrom
binyangzhu000-sudo:feat/atlascloud-provider

Conversation

@binyangzhu000-sudo

Copy link
Copy Markdown

Summary

  • add Atlas Cloud to the built-in third-party provider registry
  • configure its OpenAI-compatible endpoint and default nested model ID
  • cover session routing through the existing third-party chat path

Verification

  • npx vitest run src/utils/chatApiRoute.test.ts (2 passed)
  • npx eslint src/types/settings.ts src/utils/thirdPartyApiProviders.ts src/utils/chatApiRoute.test.ts --max-warnings=0
  • npx prettier --check src/types/settings.ts src/utils/thirdPartyApiProviders.ts src/utils/chatApiRoute.test.ts
  • npm run build
  • npm run build:api
  • live model discovery returned 123 Atlas Cloud models; the default model was present and a chat request through sendOpenAICompatibleMessageNonStream returned content

Existing baseline issues

  • npm run typecheck still reports the existing LanguageIcon.tsx:218 compactLabel error
  • the full Vitest run still has three existing useAppEvents.test.tsx Tab-cycle failures; all three reproduce on the unmodified base commit

Risk

  • the new provider is disabled by default and reuses the existing OpenAI-compatible model discovery, connection test, and chat request paths.

Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
Adapt the Atlas Cloud provider to the connection/template model introduced
on main. The previous implementation targeted the fixed-id provider record
(`providers` keyed by id plus `activeProvider`), which main replaced with a
list of connections created from templates.

- Move `atlascloud` out of LEGACY_THIRD_PARTY_PROVIDER_IDS and into
  THIRD_PARTY_TEMPLATE_IDS. Atlas Cloud never shipped in a released version,
  so it has no stored settings to migrate; leaving it in the legacy list would
  also have left LEGACY_TEMPLATE_ID and THIRD_PARTY_PROVIDER_LABELS without
  entries for it.
- Describe the provider through TEMPLATE_DEFAULTS (name, base URL, default
  model, protocol, API-key and docs links) so it can be created from the
  add-connection dialog.
- Fill in the remaining per-template records: THIRD_PARTY_TEMPLATE_LABELS,
  TEMPLATE_LABEL_KEYS with an i18n entry, and THIRD_PARTY_TEMPLATE_LOGO
  (reusing the generic logo, as there is no Atlas Cloud icon asset).
- Rewrite the routing test against the connection model, keeping every test
  main added in the meantime.
@binyangzhu000-sudo

Copy link
Copy Markdown
Author

Rebased onto current main. This turned out to be more than a conflict fix: main replaced the fixed-id provider record (providers keyed by id + activeProvider) with a list of connections created from templates, so the original implementation no longer fit. Commit 0abef0c adapts it.

What changed:

  • Moved atlascloud out of LEGACY_THIRD_PARTY_PROVIDER_IDS and into THIRD_PARTY_TEMPLATE_IDS. Atlas Cloud never shipped in a released version, so there are no stored settings to migrate — and leaving it in the legacy list would have left LEGACY_TEMPLATE_ID and THIRD_PARTY_PROVIDER_LABELS without entries for it. Worth flagging because a plain textual merge does resolve cleanly here and silently puts it in the legacy list.
  • Described the provider through TEMPLATE_DEFAULTS (name, base URL, default model, protocol, API-key and docs links) so it can be created from the add-connection dialog.
  • Filled in the remaining per-template records: THIRD_PARTY_TEMPLATE_LABELS, TEMPLATE_LABEL_KEYS plus its i18n entry, and THIRD_PARTY_TEMPLATE_LOGO — reusing the generic logo there, since there is no Atlas Cloud icon asset in assets/model-icons. Happy to add one if you'd prefer a dedicated icon.
  • Rewrote the routing test against the connection model, keeping every test main added in the meantime.

Validation:

  • vitest run — 466 files, 3280 tests passed.
  • eslint --max-warnings=0 on the six touched files — clean.
  • tsc --noEmit reports 4 errors (TextEditorModal.tsx ×2, GenerationSection.tsx, standardChatApiCall.ts). These are pre-existing: I ran the same check on a clean origin/main worktree and got the identical 4. None are in files this PR touches.

The net PR diff is 6 files / +54. CI currently shows action_required, which needs a maintainer to approve the workflow run for a fork.

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