feat(models): support minimax highspeed across onboarding

This commit is contained in:
Peter Steinberger
2026-03-03 00:39:57 +00:00
parent 53fd7f8163
commit 77ecef1fde
10 changed files with 36 additions and 14 deletions

View File

@@ -294,8 +294,8 @@ const BASE_AUTH_CHOICE_OPTIONS: ReadonlyArray<AuthChoiceOption> = [
},
{
value: "minimax-api-lightning",
label: "MiniMax M2.5 Lightning",
hint: "Faster, higher output cost",
label: "MiniMax M2.5 Highspeed",
hint: "Official fast tier (legacy: Lightning)",
},
{ value: "custom-api-key", label: "Custom Provider" },
];

View File

@@ -212,7 +212,7 @@ describe("applyAuthChoiceMiniMax", () => {
mode: "api_key",
});
expect(resolveAgentModelPrimaryValue(result?.config.agents?.defaults?.model)).toBe(
"minimax/MiniMax-M2.5-Lightning",
"minimax/MiniMax-M2.5-highspeed",
);
expect(text).not.toHaveBeenCalled();
expect(confirm).not.toHaveBeenCalled();

View File

@@ -112,7 +112,7 @@ export async function applyAuthChoiceMiniMax(
promptMessage: "Enter MiniMax API key",
modelRefPrefix: "minimax",
modelId:
params.authChoice === "minimax-api-lightning" ? "MiniMax-M2.5-Lightning" : "MiniMax-M2.5",
params.authChoice === "minimax-api-lightning" ? "MiniMax-M2.5-highspeed" : "MiniMax-M2.5",
applyDefaultConfig: applyMinimaxApiConfig,
applyProviderConfig: applyMinimaxApiProviderConfig,
});

View File

@@ -90,6 +90,7 @@ export const ZAI_DEFAULT_COST = {
const MINIMAX_MODEL_CATALOG = {
"MiniMax-M2.5": { name: "MiniMax M2.5", reasoning: true },
"MiniMax-M2.5-highspeed": { name: "MiniMax M2.5 Highspeed", reasoning: true },
"MiniMax-M2.5-Lightning": { name: "MiniMax M2.5 Lightning", reasoning: true },
} as const;

View File

@@ -370,9 +370,9 @@ describe("applyMinimaxApiConfig", () => {
});
});
it("does not set reasoning for non-reasoning models", () => {
it("keeps reasoning enabled for MiniMax-M2.5", () => {
const cfg = applyMinimaxApiConfig({}, "MiniMax-M2.5");
expect(cfg.models?.providers?.minimax?.models[0]?.reasoning).toBe(false);
expect(cfg.models?.providers?.minimax?.models[0]?.reasoning).toBe(true);
});
it("preserves existing model params when adding alias", () => {
@@ -514,8 +514,8 @@ describe("primary model defaults", () => {
it("sets correct primary model", () => {
const configCases = [
{
getConfig: () => applyMinimaxApiConfig({}, "MiniMax-M2.5-Lightning"),
primaryModel: "minimax/MiniMax-M2.5-Lightning",
getConfig: () => applyMinimaxApiConfig({}, "MiniMax-M2.5-highspeed"),
primaryModel: "minimax/MiniMax-M2.5-highspeed",
},
{
getConfig: () => applyZaiConfig({}, { modelId: "glm-5" }),

View File

@@ -831,7 +831,7 @@ export async function applyNonInteractiveAuthChoice(params: {
mode: "api_key",
});
const modelId =
authChoice === "minimax-api-lightning" ? "MiniMax-M2.5-Lightning" : "MiniMax-M2.5";
authChoice === "minimax-api-lightning" ? "MiniMax-M2.5-highspeed" : "MiniMax-M2.5";
return isCn
? applyMinimaxApiConfigCn(nextConfig, modelId)
: applyMinimaxApiConfig(nextConfig, modelId);