mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 06:32:43 +00:00
feat(models): support minimax highspeed across onboarding
This commit is contained in:
@@ -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" },
|
||||
];
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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" }),
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user