mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
feat(minimax): update models from M2.1 to M2.5
Update MiniMax models to use the new M2.5 series. This PR includes the M2.5 model updates from MiniMax-M2.5. - Update default model from MiniMax-M2.1 to MiniMax-M2.5 - Add new M2.5 models with reasoning support (M2.5, M2.5-Lightning) - Keep M2.1-lightning for backwards compatibility - Update UI labels to reflect M2.5 as recommended - Add M2.5 to live model filter
This commit is contained in:
committed by
Gustavo Madeira Santana
parent
b02c88d3e7
commit
cd1be5580e
@@ -8,7 +8,7 @@ import { loginMiniMaxPortalOAuth, type MiniMaxRegion } from "./oauth.js";
|
||||
|
||||
const PROVIDER_ID = "minimax-portal";
|
||||
const PROVIDER_LABEL = "MiniMax";
|
||||
const DEFAULT_MODEL = "MiniMax-M2.1";
|
||||
const DEFAULT_MODEL = "MiniMax-M2.5";
|
||||
const DEFAULT_BASE_URL_CN = "https://api.minimaxi.com/anthropic";
|
||||
const DEFAULT_BASE_URL_GLOBAL = "https://api.minimax.io/anthropic";
|
||||
const DEFAULT_CONTEXT_WINDOW = 200000;
|
||||
@@ -27,11 +27,12 @@ function buildModelDefinition(params: {
|
||||
id: string;
|
||||
name: string;
|
||||
input: Array<"text" | "image">;
|
||||
reasoning?: boolean;
|
||||
}) {
|
||||
return {
|
||||
id: params.id,
|
||||
name: params.name,
|
||||
reasoning: false,
|
||||
reasoning: params.reasoning ?? false,
|
||||
input: params.input,
|
||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
||||
contextWindow: DEFAULT_CONTEXT_WINDOW,
|
||||
@@ -89,9 +90,10 @@ function createOAuthHandler(region: MiniMaxRegion) {
|
||||
input: ["text"],
|
||||
}),
|
||||
buildModelDefinition({
|
||||
id: "MiniMax-M2.1-lightning",
|
||||
name: "MiniMax M2.1 Lightning",
|
||||
id: "MiniMax-M2.5",
|
||||
name: "MiniMax M2.5",
|
||||
input: ["text"],
|
||||
reasoning: true,
|
||||
}),
|
||||
],
|
||||
},
|
||||
@@ -101,7 +103,7 @@ function createOAuthHandler(region: MiniMaxRegion) {
|
||||
defaults: {
|
||||
models: {
|
||||
[modelRef("MiniMax-M2.1")]: { alias: "minimax-m2.1" },
|
||||
[modelRef("MiniMax-M2.1-lightning")]: { alias: "minimax-m2.1-lightning" },
|
||||
[modelRef("MiniMax-M2.5")]: { alias: "minimax-m2.5" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -20,7 +20,7 @@ const CODEX_MODELS = [
|
||||
];
|
||||
const GOOGLE_PREFIXES = ["gemini-3"];
|
||||
const ZAI_PREFIXES = ["glm-5", "glm-4.7", "glm-4.7-flash", "glm-4.7-flashx"];
|
||||
const MINIMAX_PREFIXES = ["minimax-m2.1"];
|
||||
const MINIMAX_PREFIXES = ["minimax-m2.1", "minimax-m2.5"];
|
||||
const XAI_PREFIXES = ["grok-4"];
|
||||
|
||||
function matchesPrefix(id: string, prefixes: string[]): boolean {
|
||||
|
||||
@@ -317,6 +317,15 @@ function buildMinimaxProvider(): ProviderConfig {
|
||||
contextWindow: MINIMAX_DEFAULT_CONTEXT_WINDOW,
|
||||
maxTokens: MINIMAX_DEFAULT_MAX_TOKENS,
|
||||
},
|
||||
{
|
||||
id: "MiniMax-M2.1-lightning",
|
||||
name: "MiniMax M2.1 Lightning",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
cost: MINIMAX_API_COST,
|
||||
contextWindow: MINIMAX_DEFAULT_CONTEXT_WINDOW,
|
||||
maxTokens: MINIMAX_DEFAULT_MAX_TOKENS,
|
||||
},
|
||||
{
|
||||
id: MINIMAX_DEFAULT_VISION_MODEL_ID,
|
||||
name: "MiniMax VL 01",
|
||||
@@ -326,6 +335,24 @@ function buildMinimaxProvider(): ProviderConfig {
|
||||
contextWindow: MINIMAX_DEFAULT_CONTEXT_WINDOW,
|
||||
maxTokens: MINIMAX_DEFAULT_MAX_TOKENS,
|
||||
},
|
||||
{
|
||||
id: "MiniMax-M2.5",
|
||||
name: "MiniMax M2.5",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: MINIMAX_API_COST,
|
||||
contextWindow: MINIMAX_DEFAULT_CONTEXT_WINDOW,
|
||||
maxTokens: MINIMAX_DEFAULT_MAX_TOKENS,
|
||||
},
|
||||
{
|
||||
id: "MiniMax-M2.5-Lightning",
|
||||
name: "MiniMax M2.5 Lightning",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: MINIMAX_API_COST,
|
||||
contextWindow: MINIMAX_DEFAULT_CONTEXT_WINDOW,
|
||||
maxTokens: MINIMAX_DEFAULT_MAX_TOKENS,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
@@ -344,6 +371,15 @@ function buildMinimaxPortalProvider(): ProviderConfig {
|
||||
contextWindow: MINIMAX_DEFAULT_CONTEXT_WINDOW,
|
||||
maxTokens: MINIMAX_DEFAULT_MAX_TOKENS,
|
||||
},
|
||||
{
|
||||
id: "MiniMax-M2.5",
|
||||
name: "MiniMax M2.5",
|
||||
reasoning: true,
|
||||
input: ["text"],
|
||||
cost: MINIMAX_API_COST,
|
||||
contextWindow: MINIMAX_DEFAULT_CONTEXT_WINDOW,
|
||||
maxTokens: MINIMAX_DEFAULT_MAX_TOKENS,
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ const AUTH_CHOICE_GROUP_DEFS: {
|
||||
{
|
||||
value: "minimax",
|
||||
label: "MiniMax",
|
||||
hint: "M2.1 (recommended)",
|
||||
hint: "M2.5 (recommended)",
|
||||
choices: ["minimax-portal", "minimax-api", "minimax-api-lightning"],
|
||||
},
|
||||
{
|
||||
@@ -285,10 +285,10 @@ export function buildAuthChoiceOptions(params: {
|
||||
label: "OpenCode Zen (multi-model proxy)",
|
||||
hint: "Claude, GPT, Gemini via opencode.ai/zen",
|
||||
});
|
||||
options.push({ value: "minimax-api", label: "MiniMax M2.1" });
|
||||
options.push({ value: "minimax-api", label: "MiniMax M2.5" });
|
||||
options.push({
|
||||
value: "minimax-api-lightning",
|
||||
label: "MiniMax M2.1 Lightning",
|
||||
label: "MiniMax M2.5 Lightning",
|
||||
hint: "Faster, higher output cost",
|
||||
});
|
||||
options.push({ value: "custom-api-key", label: "Custom Provider" });
|
||||
|
||||
@@ -55,7 +55,7 @@ export async function applyAuthChoiceMiniMax(
|
||||
params.authChoice === "minimax-api-lightning"
|
||||
) {
|
||||
const modelId =
|
||||
params.authChoice === "minimax-api-lightning" ? "MiniMax-M2.1-lightning" : "MiniMax-M2.1";
|
||||
params.authChoice === "minimax-api-lightning" ? "MiniMax-M2.5-Lightning" : "MiniMax-M2.5";
|
||||
let hasCredential = false;
|
||||
const envKey = resolveEnvApiKey("minimax");
|
||||
if (envKey) {
|
||||
|
||||
@@ -80,6 +80,8 @@ const MINIMAX_MODEL_CATALOG = {
|
||||
name: "MiniMax M2.1 Lightning",
|
||||
reasoning: false,
|
||||
},
|
||||
"MiniMax-M2.5": { name: "MiniMax M2.5", reasoning: true },
|
||||
"MiniMax-M2.5-Lightning": { name: "MiniMax M2.5 Lightning", reasoning: true },
|
||||
} as const;
|
||||
|
||||
type MinimaxCatalogId = keyof typeof MINIMAX_MODEL_CATALOG;
|
||||
|
||||
Reference in New Issue
Block a user