Skip to content

Add Atlas Cloud API bots - #1082

Open
binyangzhu000-sudo wants to merge 2 commits into
ai-shifu:mainfrom
binyangzhu000-sudo:codex/add-atlascloud-api-bots
Open

Add Atlas Cloud API bots#1082
binyangzhu000-sudo wants to merge 2 commits into
ai-shifu:mainfrom
binyangzhu000-sudo:codex/add-atlascloud-api-bots

Conversation

@binyangzhu000-sudo

@binyangzhu000-sudo binyangzhu000-sudo commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • add Atlas Cloud as an OpenAI-compatible API bot provider
  • add Qwen3.5 Flash and DeepSeek V4 Pro Atlas Cloud bot entries
  • wire Atlas Cloud into bot settings, defaults, API bot tags, and locale labels

Validation

  • npx eslint src/bots/atlascloud/AtlasCloudAPIBot.js src/bots/atlascloud/AtlasCloudQwen35FlashBot.js src/bots/atlascloud/AtlasCloudDeepSeekV4ProBot.js src/bots/index.js src/store/index.js src/store/chats.js
  • python3 -m json.tool src/i18n/locales/*.json
  • git diff --check

npm ci --ignore-scripts could not run because the current package-lock is out of sync with package.json. npm run build also fails in this local install with Webpack node: scheme errors from resolved dependencies, so I kept validation focused on the changed source and JSON files.

No README changes. No sponsor, logo, credits, or partner placement.

Summary by CodeRabbit

  • New Features
    • Added Atlas Cloud API integration with Qwen3.5 Flash and DeepSeek V4 Pro bots.
    • Introduced a new Atlas Cloud bot configuration for managing credentials and generation parameters.
  • Localization
    • Added Atlas Cloud API and model names across supported languages.
  • User Experience
    • Added Atlas Cloud settings to the settings modal.
    • Atlas Cloud bot availability updates automatically based on the configured API key.
  • Chores
    • Seeded Atlas Cloud bots into the initial chat when no chats exist yet.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9d380cd4-ebe9-430e-a754-d5c2db5a6d0c

📥 Commits

Reviewing files that changed from the base of the PR and between 150dd3b and dbe9471.

📒 Files selected for processing (3)
  • src/bots/atlascloud/AtlasCloudAPIBot.js
  • src/components/BotSettings/AtlasCloudAPIBotSettings.vue
  • src/components/SettingsModal.vue
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/bots/atlascloud/AtlasCloudAPIBot.js
  • src/components/BotSettings/AtlasCloudAPIBotSettings.vue
  • src/components/SettingsModal.vue

📝 Walkthrough

Walkthrough

Adds Atlas Cloud API support with two model bots, Vuex configuration, settings UI integration, default chat entries, bot registration, and localized provider/model labels.

Changes

Atlas Cloud integration

Layer / File(s) Summary
Configuration and bot runtime
src/store/index.js, src/bots/atlascloud/*
Adds Atlas Cloud settings state and mutation, shared API client setup, availability checks, past-round defaults, and DeepSeek/Qwen model subclasses.
Bot registration and chat defaults
src/bots/index.js, src/store/chats.js
Registers both bots globally and under the API tag, and adds them to initial favorite bots as unselected entries.
Settings UI and localization
src/components/BotSettings/AtlasCloudAPIBotSettings.vue, src/components/SettingsModal.vue, src/i18n/locales/*
Adds editable API settings, model refresh handling, modal registration, and Atlas Cloud provider/model translations across locales.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AtlasCloudAPIBotSettings
  participant VuexStore
  participant AtlasCloudAPIBot
  participant ChatOpenAI
  User->>AtlasCloudAPIBotSettings: Enter API key and model settings
  AtlasCloudAPIBotSettings->>VuexStore: Commit setAtlasCloudApi
  AtlasCloudAPIBotSettings->>AtlasCloudAPIBot: Call setupModel()
  AtlasCloudAPIBot->>VuexStore: Read Atlas Cloud configuration
  AtlasCloudAPIBot->>ChatOpenAI: Create streaming Atlas Cloud client
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding new Atlas Cloud API bot support and related bot entries.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the Atlas Cloud API bot integration, adding support for the Qwen 3.5 Flash and DeepSeek V4 Pro models. It includes the core bot implementation, settings UI, store updates, and localization files. Feedback on the changes highlights a critical configuration issue where baseURL should be used instead of basePath for the LangChain OpenAI SDK, and a bug where 0 is incorrectly treated as falsy for pastRounds. Additionally, improvements are suggested to use .forEach() instead of .map() for side effects, and to clean up the template formatting in the settings component.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +24 to +28
_setupModel() {
const chatModel = new ChatOpenAI({
configuration: {
basePath: "https://api.atlascloud.ai/v1",
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

In @langchain/openai (which uses the openai SDK v4), the custom API endpoint should be configured using the baseURL parameter instead of basePath. Using basePath will cause the SDK to ignore the custom endpoint and default to the official OpenAI API URL (https://api.openai.com/v1), which will fail for Atlas Cloud.

Suggested change
_setupModel() {
const chatModel = new ChatOpenAI({
configuration: {
basePath: "https://api.atlascloud.ai/v1",
},
_setupModel() {
const chatModel = new ChatOpenAI({
configuration: {
baseURL: "https://api.atlascloud.ai/v1",
},

Comment on lines +38 to +42
getPastRounds() {
return store.state.atlasCloudApi.pastRounds
? store.state.atlasCloudApi.pastRounds
: 5;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Using a simple ternary check store.state.atlasCloudApi.pastRounds ? ... will treat 0 as a falsy value. Since 0 is a valid configuration value for pastRounds (allowing users to disable chat history), this check will incorrectly fall back to the default value of 5. Use the nullish coalescing operator (??) to correctly handle 0.

  getPastRounds() {
    return store.state.atlasCloudApi.pastRounds ?? 5;
  }

Comment on lines +68 to +72
watcher() {
_bots.all
.filter((bot) => bot instanceof Bot)
.map((bot) => bot.setupModel());
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Using .map() solely for side effects (calling bot.setupModel()) is an anti-pattern because .map() is intended to construct and return a new array. Use .forEach() instead to clearly signal that this operation is performed for its side effects.

    watcher() {
      _bots.all
        .filter((bot) => bot instanceof Bot)
        .forEach((bot) => bot.setupModel());
    },

Comment on lines +1 to +9
<template>
<CommonBotSettings
:settings="settings"
:brand-id="brandId"
mutation-type="setAtlasCloudApi"
:watcher="watcher"
></CommonBotSettings
>
</template>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The template has inconsistent indentation and a split closing tag ></CommonBotSettings\n >. Clean up the formatting and use a self-closing tag for better readability and consistency with Vue style guidelines.

<template>
  <CommonBotSettings
    :settings="settings"
    :brand-id="brandId"
    mutation-type="setAtlasCloudApi"
    :watcher="watcher"
  />
</template>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/components/BotSettings/AtlasCloudAPIBotSettings.vue (1)

68-72: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use .forEach() instead of .map() for side effects.

The .map() method is intended for transforming arrays. Since the resulting array is unused and the goal is simply to trigger setupModel() on each bot as a side effect, use .forEach() instead. As per coding guidelines, this also prevents potential ESLint warnings for unused array returns.

♻️ Proposed refactor
     watcher() {
       _bots.all
         .filter((bot) => bot instanceof Bot)
-        .map((bot) => bot.setupModel());
+        .forEach((bot) => bot.setupModel());
     },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/BotSettings/AtlasCloudAPIBotSettings.vue` around lines 68 -
72, Update the watcher() method to replace the unused .map() call with
.forEach() when invoking bot.setupModel() on filtered Bot instances, preserving
the existing filtering and side-effect behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/bots/atlascloud/AtlasCloudAPIBot.js`:
- Around line 38-42: Update AtlasCloudAPIBot.getPastRounds() to use a nullish
check for store.state.atlasCloudApi.pastRounds, preserving an intentional value
of 0 while still defaulting to 5 when the value is null or undefined.
- Around line 25-34: Update the ChatOpenAI configuration in the constructor to
use the baseURL property instead of basePath, preserving the existing AtlasCloud
endpoint value so the client targets the correct API.

---

Nitpick comments:
In `@src/components/BotSettings/AtlasCloudAPIBotSettings.vue`:
- Around line 68-72: Update the watcher() method to replace the unused .map()
call with .forEach() when invoking bot.setupModel() on filtered Bot instances,
preserving the existing filtering and side-effect behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d206b7b7-f98e-4b0e-a6f7-e333adbba7b5

📥 Commits

Reviewing files that changed from the base of the PR and between 6d089c2 and 150dd3b.

📒 Files selected for processing (19)
  • src/bots/atlascloud/AtlasCloudAPIBot.js
  • src/bots/atlascloud/AtlasCloudDeepSeekV4ProBot.js
  • src/bots/atlascloud/AtlasCloudQwen35FlashBot.js
  • src/bots/index.js
  • src/components/BotSettings/AtlasCloudAPIBotSettings.vue
  • src/components/SettingsModal.vue
  • src/i18n/locales/de.json
  • src/i18n/locales/en.json
  • src/i18n/locales/es.json
  • src/i18n/locales/fr.json
  • src/i18n/locales/it.json
  • src/i18n/locales/ja.json
  • src/i18n/locales/ko.json
  • src/i18n/locales/ru.json
  • src/i18n/locales/vi.json
  • src/i18n/locales/zh.json
  • src/i18n/locales/zhtw.json
  • src/store/chats.js
  • src/store/index.js

Comment thread src/bots/atlascloud/AtlasCloudAPIBot.js
Comment thread src/bots/atlascloud/AtlasCloudAPIBot.js
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