feat: upgrade MiniMax provider to M2.7 with correct API base URL#85
feat: upgrade MiniMax provider to M2.7 with correct API base URL#85octo-patch wants to merge 1 commit into
Conversation
- Update base URL from api.minimax.chat/v1 to api.minimax.io/v1 - Add M2.7 and M2.7-highspeed models to custom provider presets - Add api.minimax.io to URL matcher hosts for auto-detection - Fix outdated MiniMax entries in both English and Chinese READMEs - Add unit tests for MiniMax URL detection (both old and new domains)
|
Hi @octo-patch, thanks for this PR! I've reviewed the changes manually (Codex auto-review couldn't run due to merge conflicts). Overall: Looks good — MiniMax M2.7 upgrade with proper backward compat for the old One minor note: The MiniMax link in both READMEs changed from the specific Coding Plan page to just the platform homepage. If the Coding Plan page still exists, it might be worth keeping the direct link for users. Action needed: This PR has merge conflicts with Manual review by @hqhq1025 |
There was a problem hiding this comment.
Findings
- [Major] MiniMax model IDs were added to
presets.custom, but the recommended MiniMax flow isCustom + OpenAI, and that profile reads its options frompresets.openaiinstead. The new entries therefore do not populate the model picker for the flow this PR updates, and the added test only validates the unused preset bucket. Evidence:src/shared/api-model-presets.ts:111, related contextsrc/renderer/hooks/useApiConfigState.ts:178andsrc/renderer/hooks/useApiConfigState.ts:547.
Summary
Review mode: initial
1 major issue found. The MiniMax provider guidance and docs now point users to Custom + OpenAI, but this preset change still leaves MiniMax-M2.7 and MiniMax-M2.7-highspeed out of that picker, so users fall back to manual entry. Residual risk: there is still no end-to-end test that applies the detected MiniMax setup and verifies the chosen model state.
Testing
Not run (automation)
Open Cowork Bot
| { id: 'kimi-k2-thinking', name: 'kimi-k2-thinking' }, | ||
| { id: 'glm-5', name: 'glm-5' }, | ||
| { id: 'MiniMax-M2.5', name: 'MiniMax-M2.5' }, | ||
| { id: 'MiniMax-M2.7', name: 'MiniMax-M2.7' }, |
There was a problem hiding this comment.
[MAJOR] These model IDs are being added to presets.custom, but the MiniMax setup you detect recommends Custom + OpenAI, and custom:openai resolves its model options from presets.openai (src/renderer/hooks/useApiConfigState.ts:178, src/renderer/hooks/useApiConfigState.ts:547). That means applying the MiniMax setup still drops the user into manual-model mode instead of surfacing these IDs in the picker.
Suggested fix:
openai: {
// ...
models: [
// existing OpenAI-compatible models...
{ id: 'MiniMax-M2.7', name: 'MiniMax-M2.7' },
{ id: 'MiniMax-M2.7-highspeed', name: 'MiniMax-M2.7-highspeed' },
],
}
Summary
Upgrade MiniMax provider configuration from the outdated M2.5 +
api.minimax.chatto the current M2.7 +api.minimax.io.Changes
https://api.minimax.chat/v1tohttps://api.minimax.io/v1(the current official API domain)MiniMax-M2.5withMiniMax-M2.7and addedMiniMax-M2.7-highspeed(204K context window)api.minimax.ioto the hosts array so auto-detection works for both old and new domainsdocs/common-provider-setups.mdwith current infoFiles changed (7)
src/shared/api-provider-guidance.tssrc/shared/api-model-presets.tsdocs/common-provider-setups.mdreadme.mdREADME_zh.mdtests/provider-guidance.test.tstests/api-config-state.test.tsTest plan
npx vitest run tests/provider-guidance.test.ts— all 10 tests pass (including 3 new MiniMax tests)npx vitest run tests/api-config-state.test.ts— all 15 tests passdetectCommonProviderSetup('https://api.minimax.io/v1')returns the MiniMax setup in the UIContext: MiniMax migrated their API from
api.minimax.chattoapi.minimax.io, and released M2.7 as their latest flagship model (204K context). This PR ensures Open Cowork users get the correct setup guidance.