Skip to content

feat: upgrade MiniMax default model to M2.7#134

Open
octo-patch wants to merge 1 commit intolinuxhsj:mainfrom
octo-patch:feature/upgrade-minimax-m27
Open

feat: upgrade MiniMax default model to M2.7#134
octo-patch wants to merge 1 commit intolinuxhsj:mainfrom
octo-patch:feature/upgrade-minimax-m27

Conversation

@octo-patch
Copy link

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

Summary

Upgrade MiniMax model configuration to include the latest M2.7 model as default.

Changes

  • Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to the model selection list
  • Set MiniMax-M2.7 as the new default model
  • Retain all previous models as available alternatives
  • Update related unit tests
  • Update documentation (provider docs, FAQ, gateway config examples)

Why

MiniMax-M2.7 is the latest flagship model with enhanced reasoning and coding capabilities.

Release notes:

Files Changed (16 files, 140 additions, 85 deletions)

Core model definitions

  • src/agents/models-config.providers.ts — Add M2.7 models, update default
  • src/agents/models-config.providers.static.ts — Add M2.7 models, update default
  • src/commands/onboard-auth.models.ts — Update model catalog and hosted model ID
  • extensions/minimax-portal-auth/index.ts — Add M2.7 models and aliases, update default

Auth/config

  • src/commands/auth-choice.apply.minimax.ts — Update default model IDs
  • src/commands/onboard-auth.config-minimax.ts — Update default parameters
  • src/agents/live-model-filter.ts — Add M2.7 prefix

Tests

  • src/agents/models-config.providers.minimax.test.ts — Update model list expectations
  • src/commands/auth-choice.apply.minimax.test.ts — Update default model assertions
  • src/commands/auth-choice.test.ts — Update portal default model
  • src/commands/onboard-auth.test.ts — Update merged model expectations
  • src/commands/onboard-non-interactive.provider-auth.test.ts — Update primary model assertions

Documentation

  • docs/providers/minimax.md — Update model overview, examples, troubleshooting
  • docs/help/faq.md — Update model references
  • docs/gateway/configuration-reference.md — Update config examples
  • docs/gateway/configuration-examples.md — Update fallback examples

Testing

  • Unit tests updated and passing
  • Pre-existing test failures (unrelated to MiniMax) remain unchanged

Summary by CodeRabbit

Release Notes

  • 文档

    • 更新 MiniMax 配置示例、参考文档和常见问题,反映最新模型版本
  • 配置更新

    • MiniMax 默认模型升级至 M2.7 版本
    • 新增 M2.7-highspeed 高速模型变体支持
    • 为新模型版本启用推理功能
  • 测试

    • 更新测试期望值以匹配新的模型配置

- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to model list
- Set MiniMax-M2.7 as default model
- Keep all previous models as alternatives
- Update related tests
@coderabbitai
Copy link

coderabbitai bot commented Mar 26, 2026

📝 Walkthrough

概览

该变更在整个代码库中将 MiniMax 模型引用从 M2.5 升级至 M2.7,包括更新文档、配置文件、导出的函数默认参数、模型目录定义和测试预期值。

变更

Cohort / File(s) Summary
文档 - 配置和参考
docs/gateway/configuration-examples.md, docs/gateway/configuration-reference.md, docs/help/faq.md
将 MiniMax 模型版本引用从 M2.5 更新至 M2.7,包括配置示例、默认模型别名映射、常见问题解答中的 "Unknown model" 故障排除部分。
文档 - 提供商说明
docs/providers/minimax.md
更新 MiniMax 提供商文档,包括前置内容摘要、模型系列描述、发布来源链接、模型概览部分。替换所有模型 ID 为 M2.7 及其 highspeed 变体,更新 API 密钥配置示例、故障排除部分和能力列表。
扩展 - MiniMax Portal 认证
extensions/minimax-portal-auth/index.ts
更新插件默认模型为 M2.7,扩展配置的 models 列表以包含 MiniMax-M2.7MiniMax-M2.7-highspeed 定义,添加相应的别名映射。
模型配置 - 现代模型过滤
src/agents/live-model-filter.ts
更新 MINIMAX_PREFIXES 列表以包含 minimax-m2.7 前缀,以识别现代 MiniMax 模型 ID。
模型配置 - 静态提供商定义
src/agents/models-config.providers.minimax.test.ts, src/agents/models-config.providers.static.ts, src/agents/models-config.providers.ts
扩展 MiniMax 和 MiniMax Portal 提供商的模型目录,添加 M2.7 及其 highspeed 变体,更新默认模型 ID 为 M2.7,调整模型顺序和推理能力标志。
命令 - 认证选择和配置
src/commands/auth-choice.apply.minimax.ts, src/commands/auth-choice.apply.minimax.test.ts, src/commands/auth-choice.test.ts, src/commands/onboard-auth.config-minimax.ts, src/commands/onboard-auth.models.ts
更新 MiniMax API 密钥认证应用中选择的模型 ID、导出函数默认参数(applyMinimaxApiProviderConfig 等)从 M2.5 至 M2.7,更新托管模型常量 MINIMAX_HOSTED_MODEL_ID
测试 - 模型配置和认证验证
src/commands/onboard-auth.test.ts, src/commands/onboard-non-interactive.provider-auth.test.ts
更新测试预期值,使结果代理默认模型反映 M2.7 标识符而非 M2.5。

代码审查工作量评估

🎯 3 (Moderate) | ⏱️ ~20 minutes

诗歌

🐰 一只兔子的庆贺

从 M2.5 跳到 M2.7,
模型升级跨文件飞,
配置、测试、文档新,
MiniMax 威力展无遗,
推理与速度齐驱驰!🚀

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive PR描述提供了充分的背景信息、变更内容、文件列表和发布说明链接,但缺少模板中要求的多个关键部分如变更类型、作用域、安全影响和人工验证。 补充PR描述模板中的缺失部分:标记变更类型复选框、作用域、用户可见的行为变更、安全影响评估和人工验证步骤。
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed PR标题清晰准确地反映了主要变化:升级MiniMax默认模型到M2.7版本,与所有文件变更内容相符。

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (3)
src/agents/models-config.providers.ts (1)

611-631: ⚠️ Potential issue | 🟠 Major

minimax-portal 的隐式目录把旧变体丢掉了。

这里现在只返回 MiniMax-M2.7MiniMax-M2.7-highspeedMiniMax-M2.5,但 extensions/minimax-portal-auth/index.ts 的 OAuth configPatch 仍会写入 MiniMax-M2.5-highspeedMiniMax-M2.5-Lightning。结果同一个 provider 会因为“只有 auth profile”还是“走过 OAuth patch”暴露出不同模型集,和这次升级“保留旧模型作为备选”的目标相冲突。建议把这条路径和 OAuth patch 对齐,最好直接共用同一份 MiniMax catalog。

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

In `@src/agents/models-config.providers.ts` around lines 611 - 631, The minimax
provider omitted older variants, causing a mismatch with the OAuth configPatch
in extensions/minimax-portal-auth/index.ts; update buildMinimaxPortalProvider to
include the same MiniMax catalog entries used by that configPatch (e.g., add
"MiniMax-M2.5-highspeed" and "MiniMax-M2.5-Lightning" alongside the existing
IDs) or refactor both places to import/consume a single shared MiniMax catalog
constant so the provider models and the OAuth configPatch stay synchronized.
extensions/minimax-portal-auth/index.ts (1)

79-109: ⚠️ Potential issue | 🟡 Minor

MiniMax-M2.5 也标成推理模型。

这里唯一没有显式 reasoning: true 的是 MiniMax-M2.5,而 buildModelDefinition() 会把它默认成 false。后续默认推理级别是直接读这个字段的,所以 portal OAuth 用户选到 M2.5 时会默认关闭推理模式,和同仓其他 MiniMax 目录的行为不一致。

修复建议
                   buildModelDefinition({
                     id: "MiniMax-M2.5",
                     name: "MiniMax M2.5",
                     input: ["text"],
+                    reasoning: true,
                   }),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@extensions/minimax-portal-auth/index.ts` around lines 79 - 109, models
数组里唯一缺少 reasoning: true 的条目是通过 buildModelDefinition 创建的 id 为 "MiniMax-M2.5"
的模型,导致该型号默认被视为非推理模式;请在该 buildModelDefinition 调用中为 "MiniMax-M2.5" 添加 reasoning:
true,使其与其它 MiniMax 系列模型行为一致(检查 buildModelDefinition(...) 中 id: "MiniMax-M2.5"
并加入 reasoning: true)。
src/commands/onboard-auth.config-minimax.ts (1)

113-156: ⚠️ Potential issue | 🟡 Minor

切默认模型时需要迁移旧的 Minimax alias。

这些 helper 现在默认写入 minimax/MiniMax-M2.7 / minimax-cn/MiniMax-M2.7,但后面的合并逻辑只会给新 modelRef 再写一个 alias: "Minimax",不会清掉旧的 MiniMax-M2.5 alias。老配置重跑 onboarding/auth 后会留下两个同名 shortcut,/model minimax 的解析就会变成顺序相关。

🧹 Nitpick comments (1)
src/agents/live-model-filter.ts (1)

26-26: 建议补充 minimax-m2.7 的回归测试断言。

这里扩展了前缀集合,建议在 src/agents/model-compat.test.tsisModernModelRef 场景里新增 opencode + minimax-m2.7 的排除断言,避免未来回退时漏检。

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

In `@src/agents/live-model-filter.ts` at line 26, The test coverage needs a new
assertion to prevent regressions when MINIMAX_PREFIXES was expanded: in the
isModernModelRef test case add an exclusion assertion that "opencode +
minimax-m2.7" is treated as non-modern (i.e., assert
isModernModelRef("opencode-minimax-m2.7") === false or the equivalent test
helper used), referencing the MINIMAX_PREFIXES constant/values to ensure the new
"minimax-m2.7" prefix is covered and will fail if the filtering logic in
live-model-filter.ts regresses.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@extensions/minimax-portal-auth/index.ts`:
- Around line 79-109: models 数组里唯一缺少 reasoning: true 的条目是通过 buildModelDefinition
创建的 id 为 "MiniMax-M2.5" 的模型,导致该型号默认被视为非推理模式;请在该 buildModelDefinition 调用中为
"MiniMax-M2.5" 添加 reasoning: true,使其与其它 MiniMax 系列模型行为一致(检查
buildModelDefinition(...) 中 id: "MiniMax-M2.5" 并加入 reasoning: true)。

In `@src/agents/models-config.providers.ts`:
- Around line 611-631: The minimax provider omitted older variants, causing a
mismatch with the OAuth configPatch in extensions/minimax-portal-auth/index.ts;
update buildMinimaxPortalProvider to include the same MiniMax catalog entries
used by that configPatch (e.g., add "MiniMax-M2.5-highspeed" and
"MiniMax-M2.5-Lightning" alongside the existing IDs) or refactor both places to
import/consume a single shared MiniMax catalog constant so the provider models
and the OAuth configPatch stay synchronized.

---

Nitpick comments:
In `@src/agents/live-model-filter.ts`:
- Line 26: The test coverage needs a new assertion to prevent regressions when
MINIMAX_PREFIXES was expanded: in the isModernModelRef test case add an
exclusion assertion that "opencode + minimax-m2.7" is treated as non-modern
(i.e., assert isModernModelRef("opencode-minimax-m2.7") === false or the
equivalent test helper used), referencing the MINIMAX_PREFIXES constant/values
to ensure the new "minimax-m2.7" prefix is covered and will fail if the
filtering logic in live-model-filter.ts regresses.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 83350688-0053-4079-8ad0-31e3a181d9d4

📥 Commits

Reviewing files that changed from the base of the PR and between c5d85c9 and 9543f28.

📒 Files selected for processing (16)
  • docs/gateway/configuration-examples.md
  • docs/gateway/configuration-reference.md
  • docs/help/faq.md
  • docs/providers/minimax.md
  • extensions/minimax-portal-auth/index.ts
  • src/agents/live-model-filter.ts
  • src/agents/models-config.providers.minimax.test.ts
  • src/agents/models-config.providers.static.ts
  • src/agents/models-config.providers.ts
  • src/commands/auth-choice.apply.minimax.test.ts
  • src/commands/auth-choice.apply.minimax.ts
  • src/commands/auth-choice.test.ts
  • src/commands/onboard-auth.config-minimax.ts
  • src/commands/onboard-auth.models.ts
  • src/commands/onboard-auth.test.ts
  • src/commands/onboard-non-interactive.provider-auth.test.ts

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