From 99bab9124e8a994b337ed4d7731cccf693af4390 Mon Sep 17 00:00:00 2001 From: octo-patch <266937838+octo-patch@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:59:22 +0000 Subject: [PATCH] feat(ai-provider): default MiniMax to the current MiniMax-M3 model The MiniMax provider defaulted to a superseded model and did not expose the current MiniMax-M3 model. Default to MiniMax-M3 while keeping the MINIMAX_MODEL override, and update the tests that pinned the old default. --- __tests__/ai-provider.integration.test.ts | 2 +- __tests__/ai-provider.test.ts | 4 ++-- lib/ai-provider.ts | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/__tests__/ai-provider.integration.test.ts b/__tests__/ai-provider.integration.test.ts index 5ba4cfc..8931c06 100644 --- a/__tests__/ai-provider.integration.test.ts +++ b/__tests__/ai-provider.integration.test.ts @@ -10,7 +10,7 @@ import { callAIProvider } from "@/lib/ai-provider"; describe.skipIf(!process.env.MINIMAX_API_KEY)( "MiniMax integration", () => { - it("generates a response from MiniMax M2.7", async () => { + it("generates a response from MiniMax M3", async () => { const result = await callAIProvider( "Reply with exactly: MINIMAX_OK", "minimax" diff --git a/__tests__/ai-provider.test.ts b/__tests__/ai-provider.test.ts index 1559c2f..4e3a483 100644 --- a/__tests__/ai-provider.test.ts +++ b/__tests__/ai-provider.test.ts @@ -29,7 +29,7 @@ describe("getProviderConfig", () => { const config = getProviderConfig("minimax"); expect(config.name).toBe("minimax"); expect(config.baseUrl).toBe("https://api.minimax.io/v1"); - expect(config.model).toBe("MiniMax-M2.7"); + expect(config.model).toBe("MiniMax-M3"); expect(config.apiKey).toBe("test-key"); }); @@ -176,7 +176,7 @@ describe("callAIProvider", () => { "Bearer test-minimax-key" ); const body = JSON.parse(options.body); - expect(body.model).toBe("MiniMax-M2.7"); + expect(body.model).toBe("MiniMax-M3"); expect(body.messages[0].content).toBe("test prompt"); expect(body.temperature).toBe(0.7); }); diff --git a/lib/ai-provider.ts b/lib/ai-provider.ts index f9cc20d..3cf1472 100644 --- a/lib/ai-provider.ts +++ b/lib/ai-provider.ts @@ -36,7 +36,9 @@ export function getProviderConfig( apiKey: process.env.MINIMAX_API_KEY || "", baseUrl: process.env.MINIMAX_BASE_URL || "https://api.minimax.io/v1", - model: process.env.MINIMAX_MODEL || "MiniMax-M2.7", + // Defaults to the current MiniMax-M3 model. Set MINIMAX_MODEL to + // select another model (e.g. the previous MiniMax-M2.7). + model: process.env.MINIMAX_MODEL || "MiniMax-M3", }; case "siray":