feat: upgrade MiniMax default model to M2.7 (#13593)

## Summary
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to both minimax and
minimax-global provider model lists
- Set MiniMax-M2.7 as the new default model (first in list)
- Keep all previous models (M2.5, M2.1, M2) as available alternatives
- Update function calling regex to support M2.7 and all M2.x variants
- Add M2.7 test cases for reasoning and interleaved thinking detection

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

## Changes
- `src/renderer/src/config/models/default.ts`: Add M2.7 and
M2.7-highspeed entries at the top of both `minimax` and `minimax-global`
model arrays
- `src/renderer/src/config/models/tooluse.ts`: Update function calling
regex from `minimax-m2(?:.1)?` to `minimax-m2(?:\.\d+)?(?:-[\w-]+)?` to
support all M2.x variants including M2.7
- `src/renderer/src/config/models/__tests__/reasoning.test.ts`: Add test
assertions for M2.7 reasoning model detection

## Testing
- Added explicit M2.7 test cases to reasoning and interleaved thinking
model tests
- All existing models preserved as alternatives

---------

Signed-off-by: octo-patch <octo-patch@users.noreply.github.com>
Co-authored-by: octo-patch <octo-patch@users.noreply.github.com>
Co-authored-by: George·Dong <GeorgeDong32@qq.com>
This commit is contained in:
Octopus
2026-03-18 10:52:18 -05:00
committed by GitHub
parent 4e0f2e6dbb
commit e4112ba172
4 changed files with 50 additions and 1 deletions

View File

@@ -348,6 +348,8 @@ describe('Claude & regional providers', () => {
expect(isZhipuReasoningModel(createModel({ id: 'glm-z1' }))).toBe(true)
expect(isStepReasoningModel(createModel({ id: 'step-r1-v-mini' }))).toBe(true)
expect(isMiniMaxReasoningModel(createModel({ id: 'minimax-m2-pro' }))).toBe(true)
expect(isMiniMaxReasoningModel(createModel({ id: 'minimax-m2.7' }))).toBe(true)
expect(isMiniMaxReasoningModel(createModel({ id: 'minimax-m2.7-highspeed' }))).toBe(true)
})
})

View File

@@ -154,6 +154,29 @@ describe('isFunctionCallingModel', () => {
expect(isFunctionCallingModel(createModel({ id: 'qwen3.5-397b-a17b', provider: 'dashscope' }))).toBe(true)
})
describe('MiniMax M2.x Models', () => {
it('supports minimax-m2 base model', () => {
expect(isFunctionCallingModel(createModel({ id: 'minimax-m2', provider: 'minimax' }))).toBe(true)
})
it('supports minimax-m2.1 model', () => {
expect(isFunctionCallingModel(createModel({ id: 'minimax-m2.1', provider: 'minimax' }))).toBe(true)
})
it('supports minimax-m2.7 model', () => {
expect(isFunctionCallingModel(createModel({ id: 'minimax-m2.7', provider: 'minimax' }))).toBe(true)
})
it('supports minimax-m2.7-highspeed model with suffix', () => {
expect(isFunctionCallingModel(createModel({ id: 'minimax-m2.7-highspeed', provider: 'minimax' }))).toBe(true)
})
it('supports MiniMax-M2.7 with capital letters', () => {
expect(isFunctionCallingModel(createModel({ id: 'MiniMax-M2.7', provider: 'minimax' }))).toBe(true)
expect(isFunctionCallingModel(createModel({ id: 'MiniMax-M2.7-highspeed', provider: 'minimax' }))).toBe(true)
})
})
describe('Doubao Seed 2.0 Models', () => {
it('should identify doubao-seed-2-0-pro-260215 as function calling model', () => {
const model: Model = {

View File

@@ -1029,6 +1029,18 @@ export const SYSTEM_MODELS: Record<SystemProviderId | 'defaultModel', Model[]> =
}
],
minimax: [
{
id: 'MiniMax-M2.7',
provider: 'minimax',
name: 'MiniMax-M2.7',
group: 'M2.7'
},
{
id: 'MiniMax-M2.7-highspeed',
provider: 'minimax',
name: 'MiniMax-M2.7-highspeed',
group: 'M2.7'
},
{
id: 'MiniMax-M2.5',
provider: 'minimax',
@@ -1073,6 +1085,18 @@ export const SYSTEM_MODELS: Record<SystemProviderId | 'defaultModel', Model[]> =
}
],
'minimax-global': [
{
id: 'MiniMax-M2.7',
provider: 'minimax-global',
name: 'MiniMax-M2.7',
group: 'M2.7'
},
{
id: 'MiniMax-M2.7-highspeed',
provider: 'minimax-global',
name: 'MiniMax-M2.7-highspeed',
group: 'M2.7'
},
{
id: 'MiniMax-M2.5',
provider: 'minimax-global',

View File

@@ -34,7 +34,7 @@ export const FUNCTION_CALLING_MODELS = [
'kimi-k2(?:-[\\w-]+)?',
'ling-\\w+(?:-[\\w-]+)?',
'ring-\\w+(?:-[\\w-]+)?',
'minimax-m2(?:.1)?',
'minimax-m2(?:\\.\\d+)?(?:-[\\w-]+)?',
'mimo-v2-flash'
] as const