Skip to content

feat: add MiniMax as LLM provider (M3 default, M2.7, M2.7-highspeed) - #1076

Open
octo-patch wants to merge 3 commits into
ai-shifu:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as LLM provider (M3 default, M2.7, M2.7-highspeed)#1076
octo-patch wants to merge 3 commits into
ai-shifu:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch

@octo-patch octo-patch commented Mar 17, 2026

Copy link
Copy Markdown

Summary

  • Add MiniMax as a first-class LLM provider via OpenAI-compatible API (@langchain/openai ChatOpenAI)
  • Default model is MiniMax-M3 (M2.7 and M2.7-highspeed also available)
  • Configurable API key, temperature (0.1–1.0), custom base URL, and conversation history rounds
  • Full i18n support across all 11 locale files
  • Unit tests + integration tests passing

Changes

New files

  • src/bots/minimax/MiniMaxAPIBot.js — Base class extending LangChainBot with OpenAI-compatible configuration
  • src/bots/minimax/MiniMaxM27Bot.js — MiniMax-M2.7 model bot
  • src/bots/minimax/MiniMaxM27HighspeedBot.js — MiniMax-M2.7-highspeed model bot
  • src/bots/minimax/MiniMaxM3Bot.js — MiniMax-M3 (default) model bot
  • src/components/BotSettings/MiniMaxAPIBotSettings.vue — Settings UI component
  • public/bots/minimax-logo.svg — MiniMax logo
  • tests/minimax-unit.test.js — 50 unit tests
  • tests/minimax-integration.test.js — Integration tests

Modified files

  • src/bots/index.js — Register MiniMax bots (all, api, madeInChina tags)
  • src/store/index.js — Add minimaxApi state + setMiniMaxApi mutation
  • src/components/SettingsModal.vue — Register MiniMaxAPIBotSettings component
  • src/i18n/locales/*.json — Add MiniMax model display names (11 locales)
  • README.md / README_ZH-CN.md — Add MiniMax to supported providers list

Test plan

  • All unit tests pass (node tests/minimax-unit.test.js)
  • Integration tests cover M3 and M2.7 variants

Summary by CodeRabbit

  • New Features

    • Added support for three MiniMax AI models (M27, M27-Highspeed, M3) via API integration.
    • New settings panel to configure MiniMax API credentials, temperature, custom endpoints, and conversation history.
  • Documentation

    • Updated README to reflect MiniMax support.
    • Added multilingual support across 11 languages.
  • Tests

    • Added integration and unit tests for MiniMax API functionality.

Add MiniMax as a new API-based LLM provider in ChatALL, supporting two
models: MiniMax-M2.5 (default) and MiniMax-M2.5-highspeed. Uses the
OpenAI-compatible API via @langchain/openai ChatOpenAI with a custom
base URL (https://api.minimax.io/v1).

Changes:
- New bot files: MiniMaxAPIBot, MiniMaxM25Bot, MiniMaxM25HighspeedBot
- Settings component with API key, temperature (0.1-1.0), past rounds,
  and custom API URL support
- Store state and mutation for minimaxApi configuration
- Bot registration in index.js with api and madeInChina tags
- i18n entries for all 11 locales
- MiniMax logo (SVG)
- README updates (EN and ZH-CN)
- Unit tests (42 assertions) and integration tests (17 assertions)
@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds complete MiniMax bot support to ChatALL, including three model variants (M27, M27-highspeed, M3), API configuration state, a Vue settings component, localized UI strings across 11 languages, and comprehensive unit and integration tests.

Changes

MiniMax Bot Support Integration

Layer / File(s) Summary
MiniMax Bot Variants
src/bots/minimax/MiniMaxM3Bot.js
Defines the M3 bot class extending MiniMaxAPIBot with model identifier MiniMax-M3 and logo reference. (M27 and M27-highspeed variants similarly extend the base class with their respective model names.)
Bot Registration and Tagging
src/bots/index.js
Imports three MiniMax bot classes and registers their singletons in the global all bots array and bot tag groupings (botTags.api and botTags.madeInChina).
Internationalization
src/i18n/locales/de.json, en.json, es.json, fr.json, it.json, ja.json, ko.json, ru.json, vi.json, zh.json, zhtw.json
Adds localized MiniMax provider name, model display names, API URL override prompts, and temperature control labels across all 11 supported languages.
Test Coverage
tests/minimax-integration.test.js, tests/minimax-unit.test.js
Integration tests exercise real MiniMax API calls with multiple models and multi-turn conversations; unit tests validate bot files, store state, settings components, i18n keys, logo assets, and README documentation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Hopping through the code with glee,
Three MiniMax bots, now they're free,
API and state, all wired with care,
Eleven tongues whisper everywhere! 🌍
Tests pass, the docs complete the spree.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding MiniMax as an LLM provider with M3 as the default model and M2.7 variants.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances ChatALL's capabilities by integrating MiniMax as a new LLM provider. This addition allows users to leverage MiniMax's M2.5 and M2.5-highspeed models, providing more options for diverse conversational needs. The implementation efficiently reuses existing OpenAI API compatibility, minimizing overhead while ensuring robust functionality and user configurability.

Highlights

  • New LLM Provider Integration: MiniMax has been added as a new API-based Large Language Model (LLM) provider, expanding the range of available models in ChatALL.
  • Supported MiniMax Models: The integration supports two MiniMax models: MiniMax-M2.5 (with 204K context window) and MiniMax-M2.5-highspeed (offering faster performance).
  • OpenAI-Compatible API Leverage: The integration reuses the existing @langchain/openai ChatOpenAI class, utilizing MiniMax's OpenAI-compatible API, which means no new npm dependencies were required.
  • Dedicated Settings and Localization: New settings have been introduced for MiniMax API key, temperature, past conversation rounds, and a custom API URL, complete with localization across 11 languages.
  • Comprehensive Testing: Both unit and integration tests have been added to ensure the correct functionality and stability of the MiniMax integration.
Changelog
  • README.md
    • Added MiniMax to the supported bots table.
  • README_ZH-CN.md
    • Added MiniMax to the supported bots table.
  • public/bots/minimax-logo.svg
    • Added the MiniMax logo.
  • src/bots/index.js
    • Imported MiniMaxM25Bot and MiniMaxM25HighspeedBot.
    • Registered both MiniMax bots in the all array.
    • Added both MiniMax bots to the api and madeInChina bot tags.
  • src/bots/minimax/MiniMaxAPIBot.js
    • Created a new file for the base MiniMaxAPIBot class.
    • Implemented _checkAvailability to verify API key presence.
    • Implemented _setupModel to configure ChatOpenAI with MiniMax endpoint, API key, model name, and temperature.
    • Added getPastRounds to retrieve conversation history setting.
  • src/bots/minimax/MiniMaxM25Bot.js
    • Created a new file for the MiniMaxM25Bot class, extending MiniMaxAPIBot.
    • Set static properties for class name, logo filename, and model name ("MiniMax-M2.5").
  • src/bots/minimax/MiniMaxM25HighspeedBot.js
    • Created a new file for the MiniMaxM25HighspeedBot class, extending MiniMaxAPIBot.
    • Set static properties for class name, logo filename, and model name ("MiniMax-M2.5-highspeed").
  • src/components/BotSettings/MiniMaxAPIBotSettings.vue
    • Created a new Vue component for MiniMax API settings.
    • Configured settings for API key, alternate URL, temperature, and past rounds.
    • Included a watcher to re-setup models when settings change.
  • src/components/SettingsModal.vue
    • Imported MiniMaxAPIBotSettings.
    • Added MiniMaxAPIBotSettings to the botSettings array, associating it with the minimaxApi brand.
  • src/i18n/locales/de.json
    • Added new minimaxApi object with German translations for "MiniMax API", model names, "API URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/en.json
    • Added new minimaxApi object with English translations for "MiniMax API", model names, "Alternate Base URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/es.json
    • Added new minimaxApi object with Spanish translations for "MiniMax API", model names, "API URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/fr.json
    • Added new minimaxApi object with French translations for "MiniMax API", model names, "API URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/it.json
    • Added new minimaxApi object with Italian translations for "MiniMax API", model names, "API URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/ja.json
    • Added new minimaxApi object with Japanese translations for "MiniMax API", model names, "API URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/ko.json
    • Added new minimaxApi object with Korean translations for "MiniMax API", model names, "API URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/ru.json
    • Added new minimaxApi object with Russian translations for "MiniMax API", model names, "API URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/vi.json
    • Added new minimaxApi object with Vietnamese translations for "MiniMax API", model names, "API URL", "Temperature", and related prompts/labels.
  • src/i18n/locales/zh.json
    • Added new minimaxApi object with Simplified Chinese translations for "MiniMax API", model names, "API 地址", "温度", and related prompts/labels.
  • src/i18n/locales/zhtw.json
    • Added new minimaxApi object with Traditional Chinese translations for "MiniMax API", model names, "API 地址", "温度", and related prompts/labels.
  • src/store/index.js
    • Added minimaxApi object to the state with default values for apiKey, temperature, pastRounds, and alterUrl.
    • Added setMiniMaxApi mutation to update MiniMax API settings in the store.
  • tests/minimax-integration.test.js
    • Created a new file for MiniMax API integration tests.
    • Implemented tests for basic completion, temperature handling, multi-turn conversations, and system messages for both M2.5 models.
  • tests/minimax-unit.test.js
    • Created a new file for MiniMax unit tests.
    • Verified existence and content of bot files, settings component, store configuration, bot registration, i18n entries, and logo file.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@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 adds support for the MiniMax LLM provider, including two models: MiniMax-M2.5 and MiniMax-M2.5-highspeed. The changes are comprehensive, adding new bot classes, settings components, store configurations, i18n entries, and both unit and integration tests. My review includes suggestions for code simplification, adherence to best practices, and fixing a duplicate key issue in a localization file.

Comment thread src/i18n/locales/en.json Outdated
Comment on lines +411 to +421
"minimaxApi": {
"name": "MiniMax API",
"MiniMax-M25": "MiniMax-M2.5",
"MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"
}

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

The minimaxApi key is duplicated in this file. Another definition exists at lines 320-330. JSON objects cannot have duplicate keys; the last one will overwrite the previous ones. Please remove this duplicate block. The other block at lines 320-330 seems to have more descriptive and user-friendly English text, so that one should probably be kept.

Comment on lines +26 to +31
basePath: store.state.minimaxApi.alterUrl
? store.state.minimaxApi.alterUrl
: "https://api.minimax.io/v1",
},
openAIApiKey: store.state.minimaxApi.apiKey,
modelName: this.constructor._model ? this.constructor._model : "",

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

For conciseness and improved readability, you can simplify the ternary expressions for basePath and modelName by using the logical OR (||) operator to provide default values.

Suggested change
basePath: store.state.minimaxApi.alterUrl
? store.state.minimaxApi.alterUrl
: "https://api.minimax.io/v1",
},
openAIApiKey: store.state.minimaxApi.apiKey,
modelName: this.constructor._model ? this.constructor._model : "",
basePath: store.state.minimaxApi.alterUrl || "https://api.minimax.io/v1",
},
openAIApiKey: store.state.minimaxApi.apiKey,
modelName: this.constructor._model || "",

Comment thread src/bots/minimax/MiniMaxM25Bot.js Outdated
Comment on lines +7 to +9
constructor() {
super();
}

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 constructor is redundant because it only calls super() with no arguments. In JavaScript classes, if you don't specify a constructor, a default one is provided that does exactly this. You can remove it for cleaner code.

Comment on lines +7 to +9
constructor() {
super();
}

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 constructor is redundant because it only calls super() with no arguments. In JavaScript classes, if you don't specify a constructor, a default one is provided that does exactly this. You can remove it for cleaner code.

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

For code clarity and semantic correctness, it's better to use .forEach() here instead of .map(). The .map() method is intended for creating a new array by transforming elements, but here you are only performing a side effect (calling setupModel) for each element. Using .forEach() makes the intent of the code clearer.

        .forEach((bot) => bot.setupModel());

@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: 8

🧹 Nitpick comments (7)
src/i18n/locales/de.json (1)

397-407: Missing German translations for MiniMax API strings.

The minimaxApi section contains English text instead of German translations. For consistency with other sections in this locale (e.g., openaiApi.temperature is "Temperatur", openaiApi.alterUrl is "Alternative Basis-URL"), these strings should be translated to German.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/de.json` around lines 397 - 407, The minimaxApi block
contains English values; update the keys inside minimaxApi (name, MiniMax-M25,
MiniMax-M25-highspeed, alterUrl, alterUrlPrompt, temperature, temperaturePrompt,
temperature01, temperature1) with German translations to match the locale (e.g.,
"name": "MiniMax-API", "MiniMax-M25": "MiniMax-M2.5", "MiniMax-M25-highspeed":
"MiniMax-M2.5-highspeed", "alterUrl": "API-URL", "alterUrlPrompt":
"Benutzerdefinierte API-Endpunkt-URL (Standard: https://api.minimax.io/v1)",
"temperature": "Temperatur", "temperaturePrompt": "Sampling-Temperatur zwischen
0.1 und 1", "temperature01": "Präzise", "temperature1": "Kreativ"); ensure
punctuation and casing follow existing locale style.
src/i18n/locales/ko.json (1)

400-410: Missing Korean translations for MiniMax API strings.

The minimaxApi section contains English text instead of Korean translations. For consistency with other sections in this locale (e.g., openaiApi.temperature is "온도", openaiApi.alterUrl is "대체 기본 URL"), these strings should be translated to Korean.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/ko.json` around lines 400 - 410, The minimaxApi localization
block contains English values; update the minimaxApi object (keys: name,
MiniMax-M25, MiniMax-M25-highspeed, alterUrl, alterUrlPrompt, temperature,
temperaturePrompt, temperature01, temperature1) with Korean translations
consistent with the surrounding locale (e.g., mirror openaiApi style: "온도", "대체
기본 URL") and translate prompts/labels into natural Korean while preserving any
default URL or numeric ranges in the alterUrlPrompt/temperaturePrompt strings.
src/i18n/locales/vi.json (1)

376-386: Missing Vietnamese translations for MiniMax API strings.

The minimaxApi section contains English text instead of Vietnamese translations. For consistency with other sections in this locale file (e.g., openaiApi.alterUrl is "API URL thay thế"), these strings should be translated to Vietnamese.

Compare with existing Vietnamese translations in this file:

  • openaiApi.alterUrlPrompt: "Nếu bạn đang dùng API URL tùy chỉnh, bạn có thể nhập ở đây"
  • openaiApi.temperaturePrompt: "Temperature càng cao, văn bản càng sáng tạo..."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/vi.json` around lines 376 - 386, Translate the English
values under the minimaxApi object into Vietnamese (keys: name, MiniMax-M25,
MiniMax-M25-highspeed, alterUrl, alterUrlPrompt, temperature, temperaturePrompt,
temperature01, temperature1) so they match the locale style used elsewhere
(e.g., openaiApi.alterUrl -> "API URL thay thế", openaiApi.alterUrlPrompt and
openaiApi.temperaturePrompt). Update each string value with proper Vietnamese
translations while preserving the same keys and JSON structure.
src/i18n/locales/en.json (1)

411-421: This is the second (winning) minimaxApi block.

Since JSON uses the last occurrence of duplicate keys, this block's values will be used at runtime. The translations here are consistent with other locale files in this PR.

However, note that the en.json should serve as the reference for English translations. You may want to consider whether the values from the first block (lines 320-330) were more descriptive:

  • "temperaturePrompt": "Must be between 0.1 and 1.0. Higher values produce more creative but less deterministic responses" (first block) is more detailed than "What sampling temperature to use, between 0.1 and 1" (this block).

After removing the duplicate, consider keeping the more descriptive prompts from the first block if they better serve users.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/en.json` around lines 411 - 421, There are two duplicate
"minimaxApi" blocks in en.json causing the second to override the first; remove
the duplicate block and ensure only one "minimaxApi" object remains, preserving
the more descriptive "temperaturePrompt" value from the first occurrence ("Must
be between 0.1 and 1.0. Higher values produce more creative but less
deterministic responses") and keep the rest of the keys (name, MiniMax-M25,
MiniMax-M25-highspeed, alterUrl, alterUrlPrompt, temperature, temperature01,
temperature1) intact under that single "minimaxApi" entry.
src/components/BotSettings/MiniMaxAPIBotSettings.vue (1)

67-70: Use forEach instead of map for side effects.

At Line 69, .map() is only used to call setupModel() and discards the returned array.

♻️ Suggested cleanup
     watcher() {
       _bots.all
         .filter((bot) => bot instanceof Bot)
-        .map((bot) => bot.setupModel());
+        .forEach((bot) => bot.setupModel());
     },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/BotSettings/MiniMaxAPIBotSettings.vue` around lines 67 - 70,
The code is using .map on _bots.all to call setupModel purely for side effects;
replace the .map call with .forEach to avoid creating and discarding an unused
array. Locate the expression "_bots.all.filter((bot) => bot instanceof
Bot).map((bot) => bot.setupModel())" and change the terminal .map to .forEach so
each Bot instance calls setupModel() without allocating an unnecessary array.
src/bots/index.js (1)

69-70: Prefer project alias imports for new bot entries.

For consistency with current project conventions, switch these new relative imports to @/ aliases.

♻️ Suggested import update
-import MiniMaxM25Bot from "./minimax/MiniMaxM25Bot";
-import MiniMaxM25HighspeedBot from "./minimax/MiniMaxM25HighspeedBot";
+import MiniMaxM25Bot from "@/bots/minimax/MiniMaxM25Bot";
+import MiniMaxM25HighspeedBot from "@/bots/minimax/MiniMaxM25HighspeedBot";
Based on learnings, in ChatALL the preferred import style is to use project aliases (e.g., `"@/..."`) instead of relative paths.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/bots/index.js` around lines 69 - 70, The imports for the new bots use
relative paths; update them to use the project alias style used elsewhere
(change the import sources for MiniMaxM25Bot and MiniMaxM25HighspeedBot from
"./minimax/..." to "@/minimax/..." so the module specifiers match the project's
alias convention), ensure the imported identifiers MiniMaxM25Bot and
MiniMaxM25HighspeedBot are unchanged and the build/ESLint passes after replacing
the paths.
src/bots/minimax/MiniMaxAPIBot.js (1)

1-1: Prefer @/ alias for the LangChainBot import.

Use a project alias here for consistency with src import conventions.

♻️ Suggested import change
-import LangChainBot from "../LangChainBot";
+import LangChainBot from "@/bots/LangChainBot";
As per coding guidelines, “Use the `@/` alias instead of deep relative paths for imports from `src/`.”
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/bots/minimax/MiniMaxAPIBot.js` at line 1, The import in MiniMaxAPIBot.js
uses a relative path; update the LangChainBot import to use the project alias
(prefixed with "@/") to match src import conventions—replace the current import
of LangChainBot with an aliased import like import LangChainBot from
"@/.../LangChainBot" (adjust the alias path so it resolves to the LangChainBot
module) so the MiniMaxAPIBot references the same module via the "@/..." alias.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/i18n/locales/en.json`:
- Around line 320-330: The JSON file contains a duplicated top-level
"minimaxApi" object causing one to silently override the other; remove the first
occurrence (the block containing keys "MiniMax-M25", "MiniMax-M25-highspeed",
"alterUrl", "alterUrlPrompt", "temperature", "temperaturePrompt",
"temperature01", "temperature1") and keep the later "minimaxApi" block (which
uses the consistent labels like "MiniMax-M2.5", "API URL", "Precise"/"Creative")
so translations remain consistent with other locale files.

In `@src/i18n/locales/es.json`:
- Around line 396-407: In the minimaxApi translation block, replace the English
values with Spanish equivalents: update "temperature01" to "Preciso",
"temperature1" to "Creativo", and change "alterUrlPrompt" to "URL del endpoint
API personalizado (por defecto: https://api.minimax.io/v1)"; ensure you edit the
keys inside the minimaxApi object (minimaxApi.name, MiniMax-M25,
MiniMax-M25-highspeed, alterUrl, alterUrlPrompt, temperature, temperaturePrompt,
temperature01, temperature1) so all user-facing strings are consistently
translated into Spanish.

In `@src/i18n/locales/fr.json`:
- Around line 397-407: The minimaxApi translation entries are still in English;
update the keys inside the minimaxApi object (e.g., "name", "MiniMax-M25",
"MiniMax-M25-highspeed", "alterUrl", "alterUrlPrompt", "temperature",
"temperaturePrompt", "temperature01", "temperature1") with appropriate French
strings — for example change "alterUrl" to "URL de l'API", "alterUrlPrompt" to
"URL du point d'accès API personnalisé (par défaut :
https://api.minimax.io/v1)", "temperature01" to "Précis" and "temperature1" to
"Créatif" — ensuring all values are translated to French to match the rest of
the locale file.

In `@src/i18n/locales/it.json`:
- Around line 399-409: Translate the English strings in the minimaxApi locale
object to Italian: replace the value for "alterUrlPrompt" with "URL endpoint API
personalizzato (predefinito: https://api.minimax.io/v1)", change "temperature01"
from "Precise" to "Preciso", and change "temperature1" from "Creative" to
"Creativo"; update these keys inside the minimaxApi block so the it.json file
remains consistent.

In `@src/i18n/locales/ja.json`:
- Around line 401-406: The JA locale contains English strings for keys alterUrl,
alterUrlPrompt, temperature, temperaturePrompt, temperature01, and temperature1;
update ja.json to provide proper Japanese translations for those keys (e.g.,
translate "API URL", "Custom API endpoint URL (default:
https://api.minimax.io/v1)", "Temperature", "What sampling temperature to use,
between 0.1 and 1", "Precise", and "Creative") so the Japanese locale is fully
localized while preserving the same keys and default URL text where applicable.

In `@src/i18n/locales/ru.json`:
- Around line 397-407: The minimaxApi block contains English strings that must
be translated into Russian; update the keys inside the minimaxApi object (e.g.,
"name", "MiniMax-M25", "MiniMax-M25-highspeed", "alterUrl", "alterUrlPrompt",
"temperature", "temperaturePrompt", "temperature01", "temperature1") with proper
Russian translations (for instance "Температура" for "temperature", "Точный" for
"temperature01", "Креативный" for "temperature1") and translate the
alterUrlPrompt and temperaturePrompt strings to Russian while preserving any
URLs and placeholders.

In `@src/i18n/locales/zhtw.json`:
- Around line 397-407: The minimaxApi translations in the zhtw locale use
Simplified Chinese; update the values for keys inside "minimaxApi" (alterUrl,
alterUrlPrompt, temperature, temperaturePrompt, temperature01, temperature1) to
Traditional Chinese by replacing "自定义"→"自訂", "默认"→"預設", "温度"→"溫度",
"采样温度"→"取樣溫度", "范围"→"範圍", "精确"→"精確", and "创意"→"創意" so the strings under the
minimaxApi object are consistent with Traditional Chinese.

In `@tests/minimax-integration.test.js`:
- Around line 39-40: Replace the logical-OR defaults for numeric options so
explicit zeros are preserved: in the assignments using options.temperature and
options.max_tokens (in tests/minimax-integration.test.js) swap the `||` fallback
to the nullish coalescing operator `??` so only null/undefined trigger the
defaults (e.g., change `options.temperature || 1.0` and `options.max_tokens ||
100` to use `options.temperature ?? 1.0` and `options.max_tokens ?? 100`).

---

Nitpick comments:
In `@src/bots/index.js`:
- Around line 69-70: The imports for the new bots use relative paths; update
them to use the project alias style used elsewhere (change the import sources
for MiniMaxM25Bot and MiniMaxM25HighspeedBot from "./minimax/..." to
"@/minimax/..." so the module specifiers match the project's alias convention),
ensure the imported identifiers MiniMaxM25Bot and MiniMaxM25HighspeedBot are
unchanged and the build/ESLint passes after replacing the paths.

In `@src/bots/minimax/MiniMaxAPIBot.js`:
- Line 1: The import in MiniMaxAPIBot.js uses a relative path; update the
LangChainBot import to use the project alias (prefixed with "@/") to match src
import conventions—replace the current import of LangChainBot with an aliased
import like import LangChainBot from "@/.../LangChainBot" (adjust the alias path
so it resolves to the LangChainBot module) so the MiniMaxAPIBot references the
same module via the "@/..." alias.

In `@src/components/BotSettings/MiniMaxAPIBotSettings.vue`:
- Around line 67-70: The code is using .map on _bots.all to call setupModel
purely for side effects; replace the .map call with .forEach to avoid creating
and discarding an unused array. Locate the expression "_bots.all.filter((bot) =>
bot instanceof Bot).map((bot) => bot.setupModel())" and change the terminal .map
to .forEach so each Bot instance calls setupModel() without allocating an
unnecessary array.

In `@src/i18n/locales/de.json`:
- Around line 397-407: The minimaxApi block contains English values; update the
keys inside minimaxApi (name, MiniMax-M25, MiniMax-M25-highspeed, alterUrl,
alterUrlPrompt, temperature, temperaturePrompt, temperature01, temperature1)
with German translations to match the locale (e.g., "name": "MiniMax-API",
"MiniMax-M25": "MiniMax-M2.5", "MiniMax-M25-highspeed":
"MiniMax-M2.5-highspeed", "alterUrl": "API-URL", "alterUrlPrompt":
"Benutzerdefinierte API-Endpunkt-URL (Standard: https://api.minimax.io/v1)",
"temperature": "Temperatur", "temperaturePrompt": "Sampling-Temperatur zwischen
0.1 und 1", "temperature01": "Präzise", "temperature1": "Kreativ"); ensure
punctuation and casing follow existing locale style.

In `@src/i18n/locales/en.json`:
- Around line 411-421: There are two duplicate "minimaxApi" blocks in en.json
causing the second to override the first; remove the duplicate block and ensure
only one "minimaxApi" object remains, preserving the more descriptive
"temperaturePrompt" value from the first occurrence ("Must be between 0.1 and
1.0. Higher values produce more creative but less deterministic responses") and
keep the rest of the keys (name, MiniMax-M25, MiniMax-M25-highspeed, alterUrl,
alterUrlPrompt, temperature, temperature01, temperature1) intact under that
single "minimaxApi" entry.

In `@src/i18n/locales/ko.json`:
- Around line 400-410: The minimaxApi localization block contains English
values; update the minimaxApi object (keys: name, MiniMax-M25,
MiniMax-M25-highspeed, alterUrl, alterUrlPrompt, temperature, temperaturePrompt,
temperature01, temperature1) with Korean translations consistent with the
surrounding locale (e.g., mirror openaiApi style: "온도", "대체 기본 URL") and
translate prompts/labels into natural Korean while preserving any default URL or
numeric ranges in the alterUrlPrompt/temperaturePrompt strings.

In `@src/i18n/locales/vi.json`:
- Around line 376-386: Translate the English values under the minimaxApi object
into Vietnamese (keys: name, MiniMax-M25, MiniMax-M25-highspeed, alterUrl,
alterUrlPrompt, temperature, temperaturePrompt, temperature01, temperature1) so
they match the locale style used elsewhere (e.g., openaiApi.alterUrl -> "API URL
thay thế", openaiApi.alterUrlPrompt and openaiApi.temperaturePrompt). Update
each string value with proper Vietnamese translations while preserving the same
keys and JSON structure.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 24f273ae-218a-475a-88e1-ad96e09e354b

📥 Commits

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

⛔ Files ignored due to path filters (3)
  • public/bots/minimax-logo.svg is excluded by !**/*.svg
  • public/bots/minimax-m25-highspeed-logo.png is excluded by !**/*.png
  • public/bots/minimax-m25-logo.png is excluded by !**/*.png
📒 Files selected for processing (22)
  • README.md
  • README_ZH-CN.md
  • src/bots/index.js
  • src/bots/minimax/MiniMaxAPIBot.js
  • src/bots/minimax/MiniMaxM25Bot.js
  • src/bots/minimax/MiniMaxM25HighspeedBot.js
  • src/components/BotSettings/MiniMaxAPIBotSettings.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/index.js
  • tests/minimax-integration.test.js
  • tests/minimax-unit.test.js

Comment thread src/i18n/locales/en.json
Comment thread src/i18n/locales/es.json
Comment on lines +396 to +407
"100": "100",
"minimaxApi": {
"name": "MiniMax API",
"MiniMax-M25": "MiniMax-M2.5",
"MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"
}

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.

⚠️ Potential issue | 🟡 Minor

Missing Spanish translations for MiniMax API settings.

The minimaxApi block contains English text instead of Spanish translations. Consider translating for consistency:

  • "temperature01": "Precise" → could be "Preciso"
  • "temperature1": "Creative" → could be "Creativo"
  • "alterUrlPrompt" → could be "URL del endpoint API personalizado (por defecto: https://api.minimax.io/v1)"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/es.json` around lines 396 - 407, In the minimaxApi
translation block, replace the English values with Spanish equivalents: update
"temperature01" to "Preciso", "temperature1" to "Creativo", and change
"alterUrlPrompt" to "URL del endpoint API personalizado (por defecto:
https://api.minimax.io/v1)"; ensure you edit the keys inside the minimaxApi
object (minimaxApi.name, MiniMax-M25, MiniMax-M25-highspeed, alterUrl,
alterUrlPrompt, temperature, temperaturePrompt, temperature01, temperature1) so
all user-facing strings are consistently translated into Spanish.

Comment thread src/i18n/locales/fr.json
Comment on lines +397 to +407
"minimaxApi": {
"name": "MiniMax API",
"MiniMax-M25": "MiniMax-M2.5",
"MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"
}

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.

⚠️ Potential issue | 🟡 Minor

Missing French translations for MiniMax API settings.

The minimaxApi block contains English text instead of French translations. Consider translating to maintain consistency with the rest of this locale file.

For example:

  • "alterUrl": "API URL" → could be "URL de l'API"
  • "alterUrlPrompt" → could be "URL du point d'accès API personnalisé (par défaut : https://api.minimax.io/v1)"
  • "temperature01": "Precise" → could be "Précis"
  • "temperature1": "Creative" → could be "Créatif"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/fr.json` around lines 397 - 407, The minimaxApi translation
entries are still in English; update the keys inside the minimaxApi object
(e.g., "name", "MiniMax-M25", "MiniMax-M25-highspeed", "alterUrl",
"alterUrlPrompt", "temperature", "temperaturePrompt", "temperature01",
"temperature1") with appropriate French strings — for example change "alterUrl"
to "URL de l'API", "alterUrlPrompt" to "URL du point d'accès API personnalisé
(par défaut : https://api.minimax.io/v1)", "temperature01" to "Précis" and
"temperature1" to "Créatif" — ensuring all values are translated to French to
match the rest of the locale file.

Comment thread src/i18n/locales/it.json
Comment on lines +399 to +409
"minimaxApi": {
"name": "MiniMax API",
"MiniMax-M25": "MiniMax-M2.5",
"MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"
}

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.

⚠️ Potential issue | 🟡 Minor

Missing Italian translations for MiniMax API settings.

The minimaxApi block contains English text instead of Italian translations. Consider translating for consistency with the rest of the file:

  • "temperature01": "Precise" → could be "Preciso"
  • "temperature1": "Creative" → could be "Creativo"
  • "alterUrlPrompt" → could be "URL endpoint API personalizzato (predefinito: https://api.minimax.io/v1)"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/it.json` around lines 399 - 409, Translate the English
strings in the minimaxApi locale object to Italian: replace the value for
"alterUrlPrompt" with "URL endpoint API personalizzato (predefinito:
https://api.minimax.io/v1)", change "temperature01" from "Precise" to "Preciso",
and change "temperature1" from "Creative" to "Creativo"; update these keys
inside the minimaxApi block so the it.json file remains consistent.

Comment thread src/i18n/locales/ja.json
Comment on lines +401 to +406
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"

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.

⚠️ Potential issue | 🟡 Minor

JA locale strings are untranslated English text.

Lines 401–406 introduce English UI copy in ja.json, which creates mixed-language UX in Japanese settings.

🌐 Suggested JA localization
   "minimaxApi": {
     "name": "MiniMax API",
     "MiniMax-M25": "MiniMax-M2.5",
     "MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
     "alterUrl": "API URL",
-    "alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
-    "temperature": "Temperature",
-    "temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
-    "temperature01": "Precise",
-    "temperature1": "Creative"
+    "alterUrlPrompt": "カスタム API エンドポイント URL(既定: https://api.minimax.io/v1)",
+    "temperature": "温度",
+    "temperaturePrompt": "0.1〜1 の範囲でサンプリング温度を設定します",
+    "temperature01": "正確寄り",
+    "temperature1": "創造的"
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"
"alterUrl": "API URL",
"alterUrlPrompt": "カスタム API エンドポイント URL(既定: https://api.minimax.io/v1",
"temperature": "温度",
"temperaturePrompt": "0.1〜1 の範囲でサンプリング温度を設定します",
"temperature01": "正確寄り",
"temperature1": "創造的"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/ja.json` around lines 401 - 406, The JA locale contains
English strings for keys alterUrl, alterUrlPrompt, temperature,
temperaturePrompt, temperature01, and temperature1; update ja.json to provide
proper Japanese translations for those keys (e.g., translate "API URL", "Custom
API endpoint URL (default: https://api.minimax.io/v1)", "Temperature", "What
sampling temperature to use, between 0.1 and 1", "Precise", and "Creative") so
the Japanese locale is fully localized while preserving the same keys and
default URL text where applicable.

Comment thread src/i18n/locales/ru.json
Comment on lines +397 to +407
"minimaxApi": {
"name": "MiniMax API",
"MiniMax-M25": "MiniMax-M2.5",
"MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"
}

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.

⚠️ Potential issue | 🟡 Minor

Missing Russian translations for MiniMax API settings.

The minimaxApi block contains English text instead of Russian translations. This is inconsistent with the rest of the locale file and will result in a mixed-language UI for Russian users.

For example:

  • "alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)" should be translated to Russian
  • "temperature": "Temperature" → could be "Температура"
  • "temperature01": "Precise" → could be "Точный"
  • "temperature1": "Creative" → could be "Креативный"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/ru.json` around lines 397 - 407, The minimaxApi block
contains English strings that must be translated into Russian; update the keys
inside the minimaxApi object (e.g., "name", "MiniMax-M25",
"MiniMax-M25-highspeed", "alterUrl", "alterUrlPrompt", "temperature",
"temperaturePrompt", "temperature01", "temperature1") with proper Russian
translations (for instance "Температура" for "temperature", "Точный" for
"temperature01", "Креативный" for "temperature1") and translate the
alterUrlPrompt and temperaturePrompt strings to Russian while preserving any
URLs and placeholders.

Comment on lines +397 to +407
"minimaxApi": {
"name": "MiniMax API",
"MiniMax-M25": "MiniMax-M2.5",
"MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
"alterUrl": "API 地址",
"alterUrlPrompt": "自定义 API 端点地址(默认:https://api.minimax.io/v1)",
"temperature": "温度",
"temperaturePrompt": "采样温度,范围 0.1 到 1",
"temperature01": "精确",
"temperature1": "创意"
}

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.

⚠️ Potential issue | 🟡 Minor

Simplified Chinese characters used instead of Traditional Chinese.

This is the Traditional Chinese (zhtw) locale file, but the minimaxApi translations use Simplified Chinese characters. For consistency with the rest of this file, please convert to Traditional Chinese:

Current (Simplified) Should be (Traditional)
自定义 自訂
默认 預設
温度 溫度
采样温度 取樣溫度
范围 範圍
精确 精確
创意 創意
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/zhtw.json` around lines 397 - 407, The minimaxApi
translations in the zhtw locale use Simplified Chinese; update the values for
keys inside "minimaxApi" (alterUrl, alterUrlPrompt, temperature,
temperaturePrompt, temperature01, temperature1) to Traditional Chinese by
replacing "自定义"→"自訂", "默认"→"預設", "温度"→"溫度", "采样温度"→"取樣溫度", "范围"→"範圍", "精确"→"精確",
and "创意"→"創意" so the strings under the minimaxApi object are consistent with
Traditional Chinese.

Comment on lines +39 to +40
temperature: options.temperature || 1.0,
max_tokens: options.max_tokens || 100,

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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify numeric-option defaulting patterns in this file.
rg -n 'temperature:\s*options\.temperature\s*\|\||max_tokens:\s*options\.max_tokens\s*\|\|' tests/minimax-integration.test.js

Repository: ai-shifu/ChatALL

Length of output: 157


Use nullish coalescing for numeric option defaults.

Lines 39–40 use || which treats 0 as unset. Use ?? instead so only null/undefined trigger defaults, allowing explicit 0 values to be preserved.

♻️ Suggested fix
-      temperature: options.temperature || 1.0,
-      max_tokens: options.max_tokens || 100,
+      temperature: options.temperature ?? 1.0,
+      max_tokens: options.max_tokens ?? 100,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
temperature: options.temperature || 1.0,
max_tokens: options.max_tokens || 100,
temperature: options.temperature ?? 1.0,
max_tokens: options.max_tokens ?? 100,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/minimax-integration.test.js` around lines 39 - 40, Replace the
logical-OR defaults for numeric options so explicit zeros are preserved: in the
assignments using options.temperature and options.max_tokens (in
tests/minimax-integration.test.js) swap the `||` fallback to the nullish
coalescing operator `??` so only null/undefined trigger the defaults (e.g.,
change `options.temperature || 1.0` and `options.max_tokens || 100` to use
`options.temperature ?? 1.0` and `options.max_tokens ?? 100`).

Add MiniMax-M2.7 and MiniMax-M2.7-highspeed as new bot options alongside
existing M2.5 models. Both models share the same OpenAI-compatible API
configuration via MiniMaxAPIBot base class.

Changes:
- Add MiniMaxM27Bot.js and MiniMaxM27HighspeedBot.js
- Register M2.7 bots in index.js (all, api, madeInChina tags)
- Add i18n entries for M2.7 models across all 11 locale files
- Update unit tests (58 pass) and integration tests (28 pass)

Co-Authored-By: Octopus <liyuan851277048@icloud.com>
@octo-patch octo-patch changed the title feat: add MiniMax as LLM provider (M2.5 & M2.5-highspeed) feat: add MiniMax as LLM provider (M2.5, M2.5-highspeed, M2.7, M2.7-highspeed) Mar 18, 2026

@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: 4

♻️ Duplicate comments (2)
src/i18n/locales/zhtw.json (1)

403-408: ⚠️ Potential issue | 🟡 Minor

Use Traditional Chinese in the new zhtw MiniMax strings.

These values are still in Simplified Chinese (自定义, 默认, 温度, 采样, 范围, 精确, 创意), which is inconsistent with the rest of this locale file. Please convert them to the Traditional forms (自訂, 預設, 溫度, 取樣, 範圍, 精確, 創意).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/zhtw.json` around lines 403 - 408, Convert the Simplified
Chinese strings to Traditional Chinese for the zhtw locale keys: update
"alterUrl" value to use Traditional characters, change "alterUrlPrompt" from
"自定义 API 端点地址(默认:https://api.minimax.io/v1)" to use Traditional forms ("自訂",
"預設"), change "temperature" to the Traditional form of "温度" ("溫度"), change
"temperaturePrompt" to use Traditional forms for "采样"/"范围" ("取樣"/"範圍"), and
ensure "temperature01" and "temperature1" use the Traditional terms ("精確" and
"創意"); modify the values for the keys alterUrl, alterUrlPrompt, temperature,
temperaturePrompt, temperature01, and temperature1 accordingly.
src/i18n/locales/en.json (1)

320-332: ⚠️ Potential issue | 🔴 Critical

Remove the duplicate top-level minimaxApi object.

This block is declared again at lines 413-425. The later object wins during parse, so the earlier one becomes dead data, and Biome already flags the file for duplicate keys. That also means the current unit test can still pass because JSON.parse keeps the last block.

Expected result: exactly one minimaxApi declaration in this file.

#!/bin/bash
rg -n '"minimaxApi"\s*:' src/i18n/locales/en.json
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/en.json` around lines 320 - 332, There are two top-level
"minimaxApi" objects in the JSON; remove the earlier duplicate block (the one in
the shown diff) so only a single "minimaxApi" declaration remains, ensuring keys
like "name", "MiniMax-M25", "alterUrl", and "temperaturePrompt" exist only once
and the later definition is kept; update the file so JSON.parse returns the
intended object and re-run the duplicate-key check (search for "minimaxApi") to
verify only one occurrence remains.
🧹 Nitpick comments (3)
src/bots/index.js (1)

69-72: Prefer the @/ alias for the new MiniMax imports.

These new relative imports add another exception in a file where new code is supposed to use the project alias. Keep the additions aligned with the repo convention.

♻️ Proposed fix
-import MiniMaxM25Bot from "./minimax/MiniMaxM25Bot";
-import MiniMaxM25HighspeedBot from "./minimax/MiniMaxM25HighspeedBot";
-import MiniMaxM27Bot from "./minimax/MiniMaxM27Bot";
-import MiniMaxM27HighspeedBot from "./minimax/MiniMaxM27HighspeedBot";
+import MiniMaxM25Bot from "@/bots/minimax/MiniMaxM25Bot";
+import MiniMaxM25HighspeedBot from "@/bots/minimax/MiniMaxM25HighspeedBot";
+import MiniMaxM27Bot from "@/bots/minimax/MiniMaxM27Bot";
+import MiniMaxM27HighspeedBot from "@/bots/minimax/MiniMaxM27HighspeedBot";

As per coding guidelines, "Use the @/ alias instead of deep relative paths for imports from src/".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/bots/index.js` around lines 69 - 72, Replace the deep relative imports
for the new MiniMax bots with the project alias: update the import statements
that reference MiniMaxM25Bot, MiniMaxM25HighspeedBot, MiniMaxM27Bot, and
MiniMaxM27HighspeedBot to use the "@/..." alias path pointing into the
src/minimax module instead of the current relative paths so they follow the repo
convention for imports.
tests/minimax-unit.test.js (1)

328-366: Cover the rest of the touched locale packs too.

This block only checks en.json and zh.json. Since this PR adds MiniMax strings across 11 locales, regressions in files like zhtw.json can slip through while the suite still passes. Iterating the touched locale files and asserting the minimaxApi keys exist in each one would make this test much more useful.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/minimax-unit.test.js` around lines 328 - 366, The test currently only
reads en.json and zh.json (variables enLocale and zhLocale) and asserts
minimaxApi keys; update the test to iterate over the full set of locale
filenames touched by this PR (e.g., an array of the 11 locale short names), for
each file read it with fs.readFileSync/path.join, parse JSON into a locale
variable, and assert that locale.minimaxApi exists and contains the expected
model keys (e.g., "MiniMax-M25", "MiniMax-M25-highspeed", "MiniMax-M27",
"MiniMax-M27-highspeed"); reference the existing enLocale/zhLocale usage and
replace the two standalone checks with a loop over the locales array to make the
assertions for every locale file.
tests/minimax-integration.test.js (1)

249-263: Assert the system instruction, not just a non-empty reply.

This still passes even if the provider ignores the system message entirely. The test name says “System message support”, so it should verify the PINEAPPLE suffix.

♻️ Proposed fix
       assert(result.status === 200, `Status code is 200 (got ${result.status})`);
+      const content = result.body?.choices?.[0]?.message?.content ?? "";
       assert(
-        result.body.choices[0].message.content.length > 0,
-        `Got response with system message: "${result.body.choices[0].message.content.substring(0, 100)}"`,
+        content.length > 0,
+        `Got response with system message: "${content.substring(0, 100)}"`,
+      );
+      assert(
+        content.trim().endsWith("PINEAPPLE"),
+        `System instruction was honored: "${content.substring(0, 100)}"`,
       );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/minimax-integration.test.js` around lines 249 - 263, The test currently
only checks for a non-empty reply but must assert the system instruction was
applied; update the "System message support" test (in
tests/minimax-integration.test.js around the chatCompletion call) to assert that
result.body.choices[0].message.content includes or endsWith the required
"PINEAPPLE." suffix (e.g., trim the content and verify it endsWith
"PINEAPPLE."); keep the existing status === 200 assertion and replace or add the
length check with a check that the returned message enforces the system
instruction.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/i18n/locales/de.json`:
- Around line 397-409: Translate the English strings in the minimaxApi
localization object into German: update the keys "alterUrlPrompt" to a German
sentence such as "Benutzerdefinierte API-Endpunkt-URL (Standard:
https://api.minimax.io/v1)", "temperature" to "Temperatur", "temperaturePrompt"
to something like "Sampling-Temperatur zwischen 0,1 und 1", "temperature01" to
"Präzise", and "temperature1" to "Kreativ" so the minimaxApi block matches the
rest of de.json and existing terminology used elsewhere.

In `@src/i18n/locales/ko.json`:
- Around line 400-412: The minimaxApi localization block contains English
strings; replace the user-facing values under the "minimaxApi" object (keys like
"alterUrl", "alterUrlPrompt", "temperature", "temperaturePrompt",
"temperature01", "temperature1") with Korean translations (for example:
"alterUrl" → "API URL" if desired in Korean, "alterUrlPrompt" → "사용자 정의 API
엔드포인트 URL (기본값: https://api.minimax.io/v1)", "temperature" → "온도",
"temperaturePrompt" → "0.1에서 1 사이의 샘플링 온도", "temperature01" → "정밀",
"temperature1" → "창의적") so the entire minimaxApi block matches the rest of
ko.json.

In `@tests/minimax-integration.test.js`:
- Around line 32-74: The test currently uses the helper chatCompletion() which
issues a raw HTTPS POST and bypasses MiniMax code; replace the direct HTTPS call
so the test instantiates and exercises the real MiniMax integration (the
MiniMaxAPIBot class in src/bots/minimax/MiniMaxAPIBot.js or the concrete MiniMax
bot) and calls its public production method that produces completions (e.g., the
send/handle/sendMessage/chat method used in runtime) so the test flows through
ChatOpenAI construction, store-backed alterUrl/temperature/apiKey, and streaming
configuration; ensure the test sets up the store/state or injects configuration
values (alterUrl, temperature, apiKey, streaming flag) used by MiniMaxAPIBot so
those code paths are exercised instead of the hand-rolled chatCompletion().
- Around line 89-105: The test currently dereferences
result.body.choices[0].message without stopping execution on failure; update the
checks around result, result.body.choices, and result.body.choices[0].message so
you guard existence before accessing message.content (e.g., assert that
result.body && result.body.choices && result.body.choices[0] &&
result.body.choices[0].message are truthy), and when a guard fails include the
full result (or result.body) in the assertion/error message to surface the
actual API response; apply the same pattern to the later suites that read
result.body.choices[0].message.content to avoid hidden dereference exceptions.

---

Duplicate comments:
In `@src/i18n/locales/en.json`:
- Around line 320-332: There are two top-level "minimaxApi" objects in the JSON;
remove the earlier duplicate block (the one in the shown diff) so only a single
"minimaxApi" declaration remains, ensuring keys like "name", "MiniMax-M25",
"alterUrl", and "temperaturePrompt" exist only once and the later definition is
kept; update the file so JSON.parse returns the intended object and re-run the
duplicate-key check (search for "minimaxApi") to verify only one occurrence
remains.

In `@src/i18n/locales/zhtw.json`:
- Around line 403-408: Convert the Simplified Chinese strings to Traditional
Chinese for the zhtw locale keys: update "alterUrl" value to use Traditional
characters, change "alterUrlPrompt" from "自定义 API
端点地址(默认:https://api.minimax.io/v1)" to use Traditional forms ("自訂", "預設"),
change "temperature" to the Traditional form of "温度" ("溫度"), change
"temperaturePrompt" to use Traditional forms for "采样"/"范围" ("取樣"/"範圍"), and
ensure "temperature01" and "temperature1" use the Traditional terms ("精確" and
"創意"); modify the values for the keys alterUrl, alterUrlPrompt, temperature,
temperaturePrompt, temperature01, and temperature1 accordingly.

---

Nitpick comments:
In `@src/bots/index.js`:
- Around line 69-72: Replace the deep relative imports for the new MiniMax bots
with the project alias: update the import statements that reference
MiniMaxM25Bot, MiniMaxM25HighspeedBot, MiniMaxM27Bot, and MiniMaxM27HighspeedBot
to use the "@/..." alias path pointing into the src/minimax module instead of
the current relative paths so they follow the repo convention for imports.

In `@tests/minimax-integration.test.js`:
- Around line 249-263: The test currently only checks for a non-empty reply but
must assert the system instruction was applied; update the "System message
support" test (in tests/minimax-integration.test.js around the chatCompletion
call) to assert that result.body.choices[0].message.content includes or endsWith
the required "PINEAPPLE." suffix (e.g., trim the content and verify it endsWith
"PINEAPPLE."); keep the existing status === 200 assertion and replace or add the
length check with a check that the returned message enforces the system
instruction.

In `@tests/minimax-unit.test.js`:
- Around line 328-366: The test currently only reads en.json and zh.json
(variables enLocale and zhLocale) and asserts minimaxApi keys; update the test
to iterate over the full set of locale filenames touched by this PR (e.g., an
array of the 11 locale short names), for each file read it with
fs.readFileSync/path.join, parse JSON into a locale variable, and assert that
locale.minimaxApi exists and contains the expected model keys (e.g.,
"MiniMax-M25", "MiniMax-M25-highspeed", "MiniMax-M27", "MiniMax-M27-highspeed");
reference the existing enLocale/zhLocale usage and replace the two standalone
checks with a loop over the locales array to make the assertions for every
locale file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4a31b744-1ff5-4b43-b20f-cb8ed70e34ca

📥 Commits

Reviewing files that changed from the base of the PR and between 4810639 and 39babab.

📒 Files selected for processing (16)
  • src/bots/index.js
  • src/bots/minimax/MiniMaxM27Bot.js
  • src/bots/minimax/MiniMaxM27HighspeedBot.js
  • 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
  • tests/minimax-integration.test.js
  • tests/minimax-unit.test.js
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/i18n/locales/ru.json
  • src/i18n/locales/es.json
  • src/i18n/locales/vi.json

Comment thread src/i18n/locales/de.json
Comment on lines +397 to +409
"minimaxApi": {
"name": "MiniMax API",
"MiniMax-M25": "MiniMax-M2.5",
"MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
"MiniMax-M27": "MiniMax-M2.7",
"MiniMax-M27-highspeed": "MiniMax-M2.7-highspeed",
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"
}

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.

⚠️ Potential issue | 🟡 Minor

Missing German translations for MiniMax API settings.

The minimaxApi block contains English text instead of German translations. For consistency with the rest of de.json, consider translating:

  • "alterUrlPrompt" → e.g., "Benutzerdefinierte API-Endpunkt-URL (Standard: https://api.minimax.io/v1)"
  • "temperature" → "Temperatur" (already used elsewhere in this file, e.g., line 111)
  • "temperaturePrompt" → e.g., "Sampling-Temperatur zwischen 0,1 und 1"
  • "temperature01" → e.g., "Präzise"
  • "temperature1" → e.g., "Kreativ"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/de.json` around lines 397 - 409, Translate the English
strings in the minimaxApi localization object into German: update the keys
"alterUrlPrompt" to a German sentence such as "Benutzerdefinierte
API-Endpunkt-URL (Standard: https://api.minimax.io/v1)", "temperature" to
"Temperatur", "temperaturePrompt" to something like "Sampling-Temperatur
zwischen 0,1 und 1", "temperature01" to "Präzise", and "temperature1" to
"Kreativ" so the minimaxApi block matches the rest of de.json and existing
terminology used elsewhere.

Comment thread src/i18n/locales/ko.json
Comment on lines +400 to +412
"minimaxApi": {
"name": "MiniMax API",
"MiniMax-M25": "MiniMax-M2.5",
"MiniMax-M25-highspeed": "MiniMax-M2.5-highspeed",
"MiniMax-M27": "MiniMax-M2.7",
"MiniMax-M27-highspeed": "MiniMax-M2.7-highspeed",
"alterUrl": "API URL",
"alterUrlPrompt": "Custom API endpoint URL (default: https://api.minimax.io/v1)",
"temperature": "Temperature",
"temperaturePrompt": "What sampling temperature to use, between 0.1 and 1",
"temperature01": "Precise",
"temperature1": "Creative"
}

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.

⚠️ Potential issue | 🟡 Minor

Missing Korean translations for MiniMax API settings.

The minimaxApi block contains English text instead of Korean translations. For consistency with the rest of ko.json, consider translating the user-facing strings:

  • "alterUrlPrompt" → e.g., "사용자 정의 API 엔드포인트 URL (기본값: https://api.minimax.io/v1)"
  • "temperature" → "온도" (already used elsewhere in this file)
  • "temperaturePrompt" → e.g., "0.1에서 1 사이의 샘플링 온도"
  • "temperature01" → e.g., "정밀"
  • "temperature1" → e.g., "창의적"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/locales/ko.json` around lines 400 - 412, The minimaxApi localization
block contains English strings; replace the user-facing values under the
"minimaxApi" object (keys like "alterUrl", "alterUrlPrompt", "temperature",
"temperaturePrompt", "temperature01", "temperature1") with Korean translations
(for example: "alterUrl" → "API URL" if desired in Korean, "alterUrlPrompt" →
"사용자 정의 API 엔드포인트 URL (기본값: https://api.minimax.io/v1)", "temperature" → "온도",
"temperaturePrompt" → "0.1에서 1 사이의 샘플링 온도", "temperature01" → "정밀",
"temperature1" → "창의적") so the entire minimaxApi block matches the rest of
ko.json.

Comment on lines +32 to +74
function chatCompletion(model, messages, options = {}) {
return new Promise((resolve, reject) => {
const url = new URL(`${BASE_URL}/chat/completions`);

const body = JSON.stringify({
model,
messages,
temperature: options.temperature || 1.0,
max_tokens: options.max_tokens || 100,
stream: false,
});

const req = https.request(
url,
{
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${API_KEY}`,
},
},
(res) => {
let data = "";
res.on("data", (chunk) => (data += chunk));
res.on("end", () => {
try {
resolve({ status: res.statusCode, body: JSON.parse(data) });
} catch (e) {
resolve({ status: res.statusCode, body: data });
}
});
},
);

req.on("error", reject);
req.setTimeout(60000, () => {
req.destroy();
reject(new Error("Request timed out"));
});
req.write(body);
req.end();
});
}

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.

⚠️ Potential issue | 🟠 Major

This “integration” test bypasses ChatALL’s MiniMax integration.

chatCompletion() hand-rolls an HTTPS POST to MiniMax, so regressions in src/bots/minimax/MiniMaxAPIBot.jsChatOpenAI construction, store-backed alterUrl / temperature / apiKey, and the production streaming config—would still pass here. Please drive these cases through MiniMaxAPIBot or a concrete MiniMax bot so the test actually covers the code being shipped.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/minimax-integration.test.js` around lines 32 - 74, The test currently
uses the helper chatCompletion() which issues a raw HTTPS POST and bypasses
MiniMax code; replace the direct HTTPS call so the test instantiates and
exercises the real MiniMax integration (the MiniMaxAPIBot class in
src/bots/minimax/MiniMaxAPIBot.js or the concrete MiniMax bot) and calls its
public production method that produces completions (e.g., the
send/handle/sendMessage/chat method used in runtime) so the test flows through
ChatOpenAI construction, store-backed alterUrl/temperature/apiKey, and streaming
configuration; ensure the test sets up the store/state or injects configuration
values (alterUrl, temperature, apiKey, streaming flag) used by MiniMaxAPIBot so
those code paths are exercised instead of the hand-rolled chatCompletion().

Comment on lines +89 to +105
assert(result.status === 200, `Status code is 200 (got ${result.status})`);
assert(result.body.choices, "Response has choices array");
assert(
result.body.choices.length > 0,
"Response has at least one choice",
);
assert(
result.body.choices[0].message,
"First choice has a message",
);
assert(
typeof result.body.choices[0].message.content === "string",
"Message content is a string",
);
assert(
result.body.choices[0].message.content.length > 0,
`Got response: "${result.body.choices[0].message.content.substring(0, 50)}"`,

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.

⚠️ Potential issue | 🟡 Minor

Guard choices[0].message before reading it.

assert(...) only records a failure; it does not stop execution. If the API returns an error payload or raw text, the next dereference throws and hides the actual response body. The same pattern repeats in later suites.

♻️ Proposed fix
       assert(result.status === 200, `Status code is 200 (got ${result.status})`);
-      assert(result.body.choices, "Response has choices array");
+      assert(Array.isArray(result.body?.choices), "Response has choices array");
+      const message = result.body?.choices?.[0]?.message;
+      if (!message) {
+        assert(false, `Unexpected response body: ${JSON.stringify(result.body)}`);
+        return;
+      }
       assert(
         result.body.choices.length > 0,
         "Response has at least one choice",
       );
       assert(
-        result.body.choices[0].message,
+        message,
         "First choice has a message",
       );
       assert(
-        typeof result.body.choices[0].message.content === "string",
+        typeof message.content === "string",
         "Message content is a string",
       );
       assert(
-        result.body.choices[0].message.content.length > 0,
-        `Got response: "${result.body.choices[0].message.content.substring(0, 50)}"`,
+        message.content.length > 0,
+        `Got response: "${message.content.substring(0, 50)}"`,
       );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assert(result.status === 200, `Status code is 200 (got ${result.status})`);
assert(result.body.choices, "Response has choices array");
assert(
result.body.choices.length > 0,
"Response has at least one choice",
);
assert(
result.body.choices[0].message,
"First choice has a message",
);
assert(
typeof result.body.choices[0].message.content === "string",
"Message content is a string",
);
assert(
result.body.choices[0].message.content.length > 0,
`Got response: "${result.body.choices[0].message.content.substring(0, 50)}"`,
assert(result.status === 200, `Status code is 200 (got ${result.status})`);
assert(Array.isArray(result.body?.choices), "Response has choices array");
const message = result.body?.choices?.[0]?.message;
if (!message) {
assert(false, `Unexpected response body: ${JSON.stringify(result.body)}`);
return;
}
assert(
result.body.choices.length > 0,
"Response has at least one choice",
);
assert(
message,
"First choice has a message",
);
assert(
typeof message.content === "string",
"Message content is a string",
);
assert(
message.content.length > 0,
`Got response: "${message.content.substring(0, 50)}"`,
);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/minimax-integration.test.js` around lines 89 - 105, The test currently
dereferences result.body.choices[0].message without stopping execution on
failure; update the checks around result, result.body.choices, and
result.body.choices[0].message so you guard existence before accessing
message.content (e.g., assert that result.body && result.body.choices &&
result.body.choices[0] && result.body.choices[0].message are truthy), and when a
guard fails include the full result (or result.body) in the assertion/error
message to surface the actual API response; apply the same pattern to the later
suites that read result.body.choices[0].message.content to avoid hidden
dereference exceptions.

- Add MiniMax-M3 as new default model via MiniMaxM3Bot
- Remove MiniMax-M2.5 and MiniMax-M2.5-highspeed models
- Keep MiniMax-M2.7 and MiniMax-M2.7-highspeed
- Update 11 i18n locale files to add M3 and drop M2.5 entries
- Update unit and integration tests to reference M3
@octo-patch octo-patch changed the title feat: add MiniMax as LLM provider (M2.5, M2.5-highspeed, M2.7, M2.7-highspeed) feat: add MiniMax as LLM provider (M3 default, M2.7, M2.7-highspeed) Jun 2, 2026

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/i18n/locales/vi.json (1)

381-386: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

MiniMax strings left in English in the Vietnamese locale.

alterUrl, alterUrlPrompt, temperature, temperaturePrompt, temperature01, and temperature1 are untranslated here, unlike the rest of this file (e.g., openaiApi.temperaturePrompt). Please localize these to Vietnamese for consistency.

As per coding guidelines: "Update src/i18n/locales language packs when introducing new user-facing text or actions".

🤖 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/i18n/locales/vi.json` around lines 381 - 386, The listed MiniMax strings
(alterUrl, alterUrlPrompt, temperature, temperaturePrompt, temperature01,
temperature1) are still in English; update their values to Vietnamese so the
locale is consistent — replace "API URL" with "URL API", "Custom API endpoint
URL (default: https://api.minimax.io/v1)" with "URL endpoint API tùy chỉnh (mặc
định: https://api.minimax.io/v1)", "Temperature" with "Nhiệt độ", "What sampling
temperature to use, between 0.1 and 1" with "Chọn nhiệt độ lấy mẫu, từ 0.1 đến
1", "Precise" with "Chính xác" and "Creative" with "Sáng tạo" by editing those
keys (alterUrl, alterUrlPrompt, temperature, temperaturePrompt, temperature01,
temperature1) in the locale JSON.
♻️ Duplicate comments (2)
src/i18n/locales/zhtw.json (1)

402-407: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Simplified Chinese used instead of Traditional Chinese.

The minimaxApi values still use Simplified Chinese (e.g., 自定义→自訂, 默认→預設, 温度→溫度, 采样温度→取樣溫度, 范围→範圍, 精确→精確, 创意→創意) in this Traditional Chinese (zhtw) locale.

🤖 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/i18n/locales/zhtw.json` around lines 402 - 407, The strings for the
minimaxApi keys are in Simplified Chinese; update the Traditional Chinese
translations for the keys "alterUrl", "alterUrlPrompt", "temperature",
"temperaturePrompt", "temperature01", and "temperature1" in
src/i18n/locales/zhtw.json by replacing Simplified terms with their Traditional
counterparts (例如: 自定义→自訂, 默认→預設, 温度→溫度, 采样温度→取樣溫度, 范围→範圍, 精确→精確, 创意→創意) so the
zhtw locale uses proper Traditional Chinese.
tests/minimax-integration.test.js (1)

90-110: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Guard choices[0].message before dereferencing in the new M3 suite.

assert(...) only records a failure; it does not halt execution. If MiniMax-M3 returns an error payload or raw text, line 100/104 throws and hides the actual response body. Same pattern as the other suites.

🤖 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 `@tests/minimax-integration.test.js` around lines 90 - 110, The test
dereferences result.body.choices[0].message before guaranteeing it exists, which
can throw and hide the real response; add an explicit guard/assert for
result.body.choices[0].message (e.g., assert(result.body.choices[0].message,
"First choice has a message")) before any use of choices[0].message.content, and
reorder the checks in tests/minimax-integration.test.js so checks of
choices[0].message run prior to accessing choices[0].message.content and
choices[0].message.content.length.
🤖 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/index.js`:
- Around line 69-71: Update the three import statements that currently use
relative paths to use the project alias: replace "./minimax/MiniMaxM27Bot",
"./minimax/MiniMaxM27HighspeedBot", and "./minimax/MiniMaxM3Bot" with
"`@/minimax/MiniMaxM27Bot`", "`@/minimax/MiniMaxM27HighspeedBot`", and
"`@/minimax/MiniMaxM3Bot`" respectively so that the symbols MiniMaxM27Bot,
MiniMaxM27HighspeedBot, and MiniMaxM3Bot are imported via the alias consistent
with the src/* import guideline.

---

Outside diff comments:
In `@src/i18n/locales/vi.json`:
- Around line 381-386: The listed MiniMax strings (alterUrl, alterUrlPrompt,
temperature, temperaturePrompt, temperature01, temperature1) are still in
English; update their values to Vietnamese so the locale is consistent — replace
"API URL" with "URL API", "Custom API endpoint URL (default:
https://api.minimax.io/v1)" with "URL endpoint API tùy chỉnh (mặc định:
https://api.minimax.io/v1)", "Temperature" with "Nhiệt độ", "What sampling
temperature to use, between 0.1 and 1" with "Chọn nhiệt độ lấy mẫu, từ 0.1 đến
1", "Precise" with "Chính xác" and "Creative" with "Sáng tạo" by editing those
keys (alterUrl, alterUrlPrompt, temperature, temperaturePrompt, temperature01,
temperature1) in the locale JSON.

---

Duplicate comments:
In `@src/i18n/locales/zhtw.json`:
- Around line 402-407: The strings for the minimaxApi keys are in Simplified
Chinese; update the Traditional Chinese translations for the keys "alterUrl",
"alterUrlPrompt", "temperature", "temperaturePrompt", "temperature01", and
"temperature1" in src/i18n/locales/zhtw.json by replacing Simplified terms with
their Traditional counterparts (例如: 自定义→自訂, 默认→預設, 温度→溫度, 采样温度→取樣溫度, 范围→範圍,
精确→精確, 创意→創意) so the zhtw locale uses proper Traditional Chinese.

In `@tests/minimax-integration.test.js`:
- Around line 90-110: The test dereferences result.body.choices[0].message
before guaranteeing it exists, which can throw and hide the real response; add
an explicit guard/assert for result.body.choices[0].message (e.g.,
assert(result.body.choices[0].message, "First choice has a message")) before any
use of choices[0].message.content, and reorder the checks in
tests/minimax-integration.test.js so checks of choices[0].message run prior to
accessing choices[0].message.content and choices[0].message.content.length.
🪄 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: 1e5bb11a-f341-40cf-92db-e6152f2c536f

📥 Commits

Reviewing files that changed from the base of the PR and between 39babab and 5c952ab.

📒 Files selected for processing (15)
  • src/bots/index.js
  • src/bots/minimax/MiniMaxM3Bot.js
  • 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
  • tests/minimax-integration.test.js
  • tests/minimax-unit.test.js
✅ Files skipped from review due to trivial changes (1)
  • src/bots/minimax/MiniMaxM3Bot.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/i18n/locales/ko.json
  • src/i18n/locales/fr.json

Comment thread src/bots/index.js
Comment on lines +69 to +71
import MiniMaxM27Bot from "./minimax/MiniMaxM27Bot";
import MiniMaxM27HighspeedBot from "./minimax/MiniMaxM27HighspeedBot";
import MiniMaxM3Bot from "./minimax/MiniMaxM3Bot";

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.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Use @/ alias for MiniMax bot imports.

Lines 69-71 use relative import paths (./minimax/...) instead of the @/ alias. As per coding guidelines, imports from src/ should use the @/ alias for consistency and clarity.

♻️ Proposed fix
-import MiniMaxM27Bot from "./minimax/MiniMaxM27Bot";
-import MiniMaxM27HighspeedBot from "./minimax/MiniMaxM27HighspeedBot";
-import MiniMaxM3Bot from "./minimax/MiniMaxM3Bot";
+import MiniMaxM27Bot from "`@/bots/minimax/MiniMaxM27Bot`";
+import MiniMaxM27HighspeedBot from "`@/bots/minimax/MiniMaxM27HighspeedBot`";
+import MiniMaxM3Bot from "`@/bots/minimax/MiniMaxM3Bot`";

As per coding guidelines for src/**/*.{js,ts,vue}: Use the @/ alias instead of deep relative paths for imports from src/.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import MiniMaxM27Bot from "./minimax/MiniMaxM27Bot";
import MiniMaxM27HighspeedBot from "./minimax/MiniMaxM27HighspeedBot";
import MiniMaxM3Bot from "./minimax/MiniMaxM3Bot";
import MiniMaxM27Bot from "`@/bots/minimax/MiniMaxM27Bot`";
import MiniMaxM27HighspeedBot from "`@/bots/minimax/MiniMaxM27HighspeedBot`";
import MiniMaxM3Bot from "`@/bots/minimax/MiniMaxM3Bot`";
🤖 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/bots/index.js` around lines 69 - 71, Update the three import statements
that currently use relative paths to use the project alias: replace
"./minimax/MiniMaxM27Bot", "./minimax/MiniMaxM27HighspeedBot", and
"./minimax/MiniMaxM3Bot" with "`@/minimax/MiniMaxM27Bot`",
"`@/minimax/MiniMaxM27HighspeedBot`", and "`@/minimax/MiniMaxM3Bot`" respectively so
that the symbols MiniMaxM27Bot, MiniMaxM27HighspeedBot, and MiniMaxM3Bot are
imported via the alias consistent with the src/* import guideline.

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