feat: upgrade MiniMax default model to M2.7#134
feat: upgrade MiniMax default model to M2.7#134octo-patch wants to merge 1 commit intolinuxhsj:mainfrom
Conversation
- 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
📝 Walkthrough概览该变更在整个代码库中将 MiniMax 模型引用从 M2.5 升级至 M2.7,包括更新文档、配置文件、导出的函数默认参数、模型目录定义和测试预期值。 变更
代码审查工作量评估🎯 3 (Moderate) | ⏱️ ~20 minutes 诗歌
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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.7、MiniMax-M2.7-highspeed和MiniMax-M2.5,但extensions/minimax-portal-auth/index.ts的 OAuthconfigPatch仍会写入MiniMax-M2.5-highspeed与MiniMax-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切默认模型时需要迁移旧的
Minimaxalias。这些 helper 现在默认写入
minimax/MiniMax-M2.7/minimax-cn/MiniMax-M2.7,但后面的合并逻辑只会给新 modelRef 再写一个alias: "Minimax",不会清掉旧的MiniMax-M2.5alias。老配置重跑 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.ts的isModernModelRef场景里新增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
📒 Files selected for processing (16)
docs/gateway/configuration-examples.mddocs/gateway/configuration-reference.mddocs/help/faq.mddocs/providers/minimax.mdextensions/minimax-portal-auth/index.tssrc/agents/live-model-filter.tssrc/agents/models-config.providers.minimax.test.tssrc/agents/models-config.providers.static.tssrc/agents/models-config.providers.tssrc/commands/auth-choice.apply.minimax.test.tssrc/commands/auth-choice.apply.minimax.tssrc/commands/auth-choice.test.tssrc/commands/onboard-auth.config-minimax.tssrc/commands/onboard-auth.models.tssrc/commands/onboard-auth.test.tssrc/commands/onboard-non-interactive.provider-auth.test.ts
Summary
Upgrade MiniMax model configuration to include the latest M2.7 model as default.
Changes
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 defaultsrc/agents/models-config.providers.static.ts— Add M2.7 models, update defaultsrc/commands/onboard-auth.models.ts— Update model catalog and hosted model IDextensions/minimax-portal-auth/index.ts— Add M2.7 models and aliases, update defaultAuth/config
src/commands/auth-choice.apply.minimax.ts— Update default model IDssrc/commands/onboard-auth.config-minimax.ts— Update default parameterssrc/agents/live-model-filter.ts— Add M2.7 prefixTests
src/agents/models-config.providers.minimax.test.ts— Update model list expectationssrc/commands/auth-choice.apply.minimax.test.ts— Update default model assertionssrc/commands/auth-choice.test.ts— Update portal default modelsrc/commands/onboard-auth.test.ts— Update merged model expectationssrc/commands/onboard-non-interactive.provider-auth.test.ts— Update primary model assertionsDocumentation
docs/providers/minimax.md— Update model overview, examples, troubleshootingdocs/help/faq.md— Update model referencesdocs/gateway/configuration-reference.md— Update config examplesdocs/gateway/configuration-examples.md— Update fallback examplesTesting
Summary by CodeRabbit
Release Notes
文档
配置更新
测试