From 76e88d80a45dd3262cf06447b8171964e5bd03af Mon Sep 17 00:00:00 2001 From: octo-patch Date: Tue, 2 Jun 2026 06:56:58 +0800 Subject: [PATCH 1/4] feat: upgrade MiniMax default model to M3 - Add MiniMax-M3 to the model selection list and set it as the new default - Retain MiniMax-M2.7 (1M context) as an alternative - Remove deprecated MiniMax-M2.5 and MiniMax-M2.5-highspeed from the list - Update related unit/integration tests and README references --- README.md | 4 ++-- __tests__/minimax-ai-client.test.ts | 10 +++++----- __tests__/minimax-integration.test.ts | 4 ++-- app/api/settings/route.ts | 5 ++--- app/api/settings/test/route.ts | 2 +- app/settings/page.tsx | 9 ++++----- lib/settings.ts | 2 +- 7 files changed, 17 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 66bed3a..42fd09c 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ All settings are manageable in the **Settings** page at `/settings` or via envir | API Base URL | `ANTHROPIC_BASE_URL` | Custom endpoint for proxies or local Anthropic-compatible models | | AI Model | Settings page only | Haiku 4.5 (default, fastest/cheapest), Sonnet 4.6, Opus 4.6 | | OpenAI Key | `OPENAI_API_KEY` | Alternative provider — GPT-4.1 Mini/Nano/Full, o4-mini, o3 | -| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M2.7 (1M context), M2.5, M2.5-highspeed | +| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M3 (default, 512K context), M2.7 (1M context) | | MiniMax Base URL | `MINIMAX_BASE_URL` | Custom MiniMax API endpoint (default: `https://api.minimax.io/v1`) | | Database | `DATABASE_URL` | SQLite file path (default: `file:./prisma/dev.db`) | @@ -356,7 +356,7 @@ For Prisma command and workflow details, see: | [SQLite](https://sqlite.org) | — | Local database — zero setup, includes FTS5 | | [Tailwind CSS](https://tailwindcss.com) | v4 | Styling | | [Anthropic SDK](https://docs.anthropic.com) | — | Vision, semantic tagging, categorization, search | -| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M2.7 1M context, M2.5) | +| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M3 default, M2.7 1M context) | | [@xyflow/react](https://xyflow.com) | 12 | Interactive mindmap graph | | [Framer Motion](https://www.framer.com/motion/) | 12 | Animations | | [Radix UI](https://www.radix-ui.com) | — | Accessible UI primitives | diff --git a/__tests__/minimax-ai-client.test.ts b/__tests__/minimax-ai-client.test.ts index 3a8d8e6..ac46a98 100644 --- a/__tests__/minimax-ai-client.test.ts +++ b/__tests__/minimax-ai-client.test.ts @@ -26,7 +26,7 @@ describe('MiniMaxAIClient', () => { const client = new MiniMaxAIClient(mock) const result = await client.createMessage({ - model: 'MiniMax-M2.7', + model: 'MiniMax-M3', max_tokens: 100, messages: [{ role: 'user', content: 'hi' }], }) @@ -41,7 +41,7 @@ describe('MiniMaxAIClient', () => { const client = new MiniMaxAIClient(mock) const result = await client.createMessage({ - model: 'MiniMax-M2.5', + model: 'MiniMax-M3', max_tokens: 100, messages: [{ role: 'user', content: 'test' }], }) @@ -57,7 +57,7 @@ describe('MiniMaxAIClient', () => { const client = new MiniMaxAIClient(mock) const result = await client.createMessage({ - model: 'MiniMax-M2.5', + model: 'MiniMax-M3', max_tokens: 100, messages: [{ role: 'user', content: 'test' }], }) @@ -113,14 +113,14 @@ describe('MiniMaxAIClient', () => { const client = new MiniMaxAIClient(mock) await client.createMessage({ - model: 'MiniMax-M2.7', + model: 'MiniMax-M3', max_tokens: 512, messages: [{ role: 'user', content: 'test' }], }) expect(createFn).toHaveBeenCalledWith( expect.objectContaining({ - model: 'MiniMax-M2.7', + model: 'MiniMax-M3', max_tokens: 512, }) ) diff --git a/__tests__/minimax-integration.test.ts b/__tests__/minimax-integration.test.ts index 2081bca..7b85ab6 100644 --- a/__tests__/minimax-integration.test.ts +++ b/__tests__/minimax-integration.test.ts @@ -32,7 +32,7 @@ describe('MiniMax integration - categorization pipeline', () => { const client = new MiniMaxAIClient(createMockSDK(jsonResponse)) const result = await client.createMessage({ - model: 'MiniMax-M2.7', + model: 'MiniMax-M3', max_tokens: 4096, messages: [ { @@ -53,7 +53,7 @@ describe('MiniMax integration - categorization pipeline', () => { const client = new MiniMaxAIClient(createMockSDK(response)) const result = await client.createMessage({ - model: 'MiniMax-M2.5', + model: 'MiniMax-M3', max_tokens: 4096, messages: [{ role: 'user', content: 'Categorize...' }], }) diff --git a/app/api/settings/route.ts b/app/api/settings/route.ts index 6debf8d..4e683e2 100644 --- a/app/api/settings/route.ts +++ b/app/api/settings/route.ts @@ -24,9 +24,8 @@ const ALLOWED_OPENAI_MODELS = [ ] as const const ALLOWED_MINIMAX_MODELS = [ + 'MiniMax-M3', 'MiniMax-M2.7', - 'MiniMax-M2.5', - 'MiniMax-M2.5-highspeed', ] as const export async function GET(): Promise { @@ -54,7 +53,7 @@ export async function GET(): Promise { openaiModel: openaiModel?.value ?? 'gpt-4.1-mini', minimaxApiKey: maskKey(minimax?.value ?? null), hasMinimaxKey: minimax !== null, - minimaxModel: minimaxModel?.value ?? 'MiniMax-M2.7', + minimaxModel: minimaxModel?.value ?? 'MiniMax-M3', xOAuthClientId: maskKey(xClientId?.value ?? null), xOAuthClientSecret: maskKey(xClientSecret?.value ?? null), hasXOAuth: !!xClientId?.value, diff --git a/app/api/settings/test/route.ts b/app/api/settings/test/route.ts index e1291a6..a92ba74 100644 --- a/app/api/settings/test/route.ts +++ b/app/api/settings/test/route.ts @@ -90,7 +90,7 @@ export async function POST(request: NextRequest): Promise { try { await client.chat.completions.create({ - model: 'MiniMax-M2.7', + model: 'MiniMax-M3', max_tokens: 5, messages: [{ role: 'user', content: 'hi' }], }) diff --git a/app/settings/page.tsx b/app/settings/page.tsx index 56f3115..7d3b974 100644 --- a/app/settings/page.tsx +++ b/app/settings/page.tsx @@ -42,9 +42,8 @@ const OPENAI_MODELS = [ ] const MINIMAX_MODELS = [ - { value: 'MiniMax-M2.7', label: 'M2.7', description: '1M Context, Latest' }, - { value: 'MiniMax-M2.5', label: 'M2.5', description: '204K Context' }, - { value: 'MiniMax-M2.5-highspeed', label: 'M2.5 Highspeed', description: '204K, Fastest' }, + { value: 'MiniMax-M3', label: 'M3', description: '512K Context, Latest' }, + { value: 'MiniMax-M2.7', label: 'M2.7', description: '1M Context' }, ] @@ -678,10 +677,10 @@ function ApiKeySection({ onToast }: { onToast: (t: Toast) => void }) { -

MiniMax M2.7 supports 1M context window — great for large batch categorization

+

MiniMax M3 is the latest flagship with 512K context — M2.7 (1M context) remains available

)} diff --git a/lib/settings.ts b/lib/settings.ts index 7da5eb8..7880ab9 100644 --- a/lib/settings.ts +++ b/lib/settings.ts @@ -55,7 +55,7 @@ export async function getOpenAIModel(): Promise { export async function getMiniMaxModel(): Promise { if (_cachedMiniMaxModel && Date.now() < _miniMaxModelCacheExpiry) return _cachedMiniMaxModel const setting = await prisma.setting.findUnique({ where: { key: 'minimaxModel' } }) - _cachedMiniMaxModel = setting?.value ?? 'MiniMax-M2.7' + _cachedMiniMaxModel = setting?.value ?? 'MiniMax-M3' _miniMaxModelCacheExpiry = Date.now() + CACHE_TTL return _cachedMiniMaxModel } From ecb33282c2c0746d8be7ebe4fedc762ac515c4a9 Mon Sep 17 00:00:00 2001 From: Octopus Date: Wed, 3 Jun 2026 22:20:57 +0800 Subject: [PATCH 2/4] docs: correct MiniMax context window (M3=512K, M2.7=192K; was mistakenly 1M) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42fd09c..9e1b189 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ All settings are manageable in the **Settings** page at `/settings` or via envir | API Base URL | `ANTHROPIC_BASE_URL` | Custom endpoint for proxies or local Anthropic-compatible models | | AI Model | Settings page only | Haiku 4.5 (default, fastest/cheapest), Sonnet 4.6, Opus 4.6 | | OpenAI Key | `OPENAI_API_KEY` | Alternative provider — GPT-4.1 Mini/Nano/Full, o4-mini, o3 | -| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M3 (default, 512K context), M2.7 (1M context) | +| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M3 (default, 512K context), M2.7 (512K context) | | MiniMax Base URL | `MINIMAX_BASE_URL` | Custom MiniMax API endpoint (default: `https://api.minimax.io/v1`) | | Database | `DATABASE_URL` | SQLite file path (default: `file:./prisma/dev.db`) | @@ -356,7 +356,7 @@ For Prisma command and workflow details, see: | [SQLite](https://sqlite.org) | — | Local database — zero setup, includes FTS5 | | [Tailwind CSS](https://tailwindcss.com) | v4 | Styling | | [Anthropic SDK](https://docs.anthropic.com) | — | Vision, semantic tagging, categorization, search | -| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M3 default, M2.7 1M context) | +| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M3 default, M2.7 512K context) | | [@xyflow/react](https://xyflow.com) | 12 | Interactive mindmap graph | | [Framer Motion](https://www.framer.com/motion/) | 12 | Animations | | [Radix UI](https://www.radix-ui.com) | — | Accessible UI primitives | From 7dd5dd66b9b98b0a98d8ea44afd71ef3d63ccaef Mon Sep 17 00:00:00 2001 From: Octopus Date: Wed, 3 Jun 2026 22:22:15 +0800 Subject: [PATCH 3/4] docs: fix context-window wording (M3=512K, M2.7=192K) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e1b189..b9cd5ab 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ All settings are manageable in the **Settings** page at `/settings` or via envir | API Base URL | `ANTHROPIC_BASE_URL` | Custom endpoint for proxies or local Anthropic-compatible models | | AI Model | Settings page only | Haiku 4.5 (default, fastest/cheapest), Sonnet 4.6, Opus 4.6 | | OpenAI Key | `OPENAI_API_KEY` | Alternative provider — GPT-4.1 Mini/Nano/Full, o4-mini, o3 | -| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M3 (default, 512K context), M2.7 (512K context) | +| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M3 (default, 512K context), M2.7 (192K context) | | MiniMax Base URL | `MINIMAX_BASE_URL` | Custom MiniMax API endpoint (default: `https://api.minimax.io/v1`) | | Database | `DATABASE_URL` | SQLite file path (default: `file:./prisma/dev.db`) | @@ -356,7 +356,7 @@ For Prisma command and workflow details, see: | [SQLite](https://sqlite.org) | — | Local database — zero setup, includes FTS5 | | [Tailwind CSS](https://tailwindcss.com) | v4 | Styling | | [Anthropic SDK](https://docs.anthropic.com) | — | Vision, semantic tagging, categorization, search | -| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M3 default, M2.7 512K context) | +| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M3 default, M2.7 192K context) | | [@xyflow/react](https://xyflow.com) | 12 | Interactive mindmap graph | | [Framer Motion](https://www.framer.com/motion/) | 12 | Animations | | [Radix UI](https://www.radix-ui.com) | — | Accessible UI primitives | From 19ba515dd3f6ef4b62756d275219cff93084c24b Mon Sep 17 00:00:00 2001 From: octo-patch Date: Thu, 4 Jun 2026 09:13:30 +0800 Subject: [PATCH 4/4] feat: add MiniMax-M2.7-highspeed to model list - Add MiniMax-M2.7-highspeed to the allowed MiniMax models in the settings API - Surface MiniMax-M2.7-highspeed as a select option in the settings page - Update README references to mention the M2.7 Highspeed variant Co-Authored-By: Octopus --- README.md | 4 ++-- app/api/settings/route.ts | 1 + app/settings/page.tsx | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b9cd5ab..0145cf0 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ All settings are manageable in the **Settings** page at `/settings` or via envir | API Base URL | `ANTHROPIC_BASE_URL` | Custom endpoint for proxies or local Anthropic-compatible models | | AI Model | Settings page only | Haiku 4.5 (default, fastest/cheapest), Sonnet 4.6, Opus 4.6 | | OpenAI Key | `OPENAI_API_KEY` | Alternative provider — GPT-4.1 Mini/Nano/Full, o4-mini, o3 | -| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M3 (default, 512K context), M2.7 (192K context) | +| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M3 (default, 512K context), M2.7 (192K context), M2.7 Highspeed | | MiniMax Base URL | `MINIMAX_BASE_URL` | Custom MiniMax API endpoint (default: `https://api.minimax.io/v1`) | | Database | `DATABASE_URL` | SQLite file path (default: `file:./prisma/dev.db`) | @@ -356,7 +356,7 @@ For Prisma command and workflow details, see: | [SQLite](https://sqlite.org) | — | Local database — zero setup, includes FTS5 | | [Tailwind CSS](https://tailwindcss.com) | v4 | Styling | | [Anthropic SDK](https://docs.anthropic.com) | — | Vision, semantic tagging, categorization, search | -| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M3 default, M2.7 192K context) | +| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M3 default, M2.7 192K context, M2.7 Highspeed) | | [@xyflow/react](https://xyflow.com) | 12 | Interactive mindmap graph | | [Framer Motion](https://www.framer.com/motion/) | 12 | Animations | | [Radix UI](https://www.radix-ui.com) | — | Accessible UI primitives | diff --git a/app/api/settings/route.ts b/app/api/settings/route.ts index 4e683e2..f4bfb2a 100644 --- a/app/api/settings/route.ts +++ b/app/api/settings/route.ts @@ -26,6 +26,7 @@ const ALLOWED_OPENAI_MODELS = [ const ALLOWED_MINIMAX_MODELS = [ 'MiniMax-M3', 'MiniMax-M2.7', + 'MiniMax-M2.7-highspeed', ] as const export async function GET(): Promise { diff --git a/app/settings/page.tsx b/app/settings/page.tsx index 7d3b974..ee89b2a 100644 --- a/app/settings/page.tsx +++ b/app/settings/page.tsx @@ -43,7 +43,8 @@ const OPENAI_MODELS = [ const MINIMAX_MODELS = [ { value: 'MiniMax-M3', label: 'M3', description: '512K Context, Latest' }, - { value: 'MiniMax-M2.7', label: 'M2.7', description: '1M Context' }, + { value: 'MiniMax-M2.7', label: 'M2.7', description: '192K Context' }, + { value: 'MiniMax-M2.7-highspeed', label: 'M2.7 Highspeed', description: 'Fast M2.7 Variant' }, ]