mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 04:00:24 +00:00
feat(minimax): add image generation provider and trim model catalog to M2.7 (#54487)
* feat(minimax): add image generation and TTS providers, trim TUI model list Register MiniMax image-01 and speech-2.8 models as plugin providers for the image_generate and TTS tools. Both resolve CN/global base URLs from the configured model endpoint origin. - Image generation: base64 response, aspect-ratio support, image-to-image via subject_reference, registered for minimax and minimax-portal - TTS: speech-2.8-turbo (default) and speech-2.8-hd, hex-encoded audio, voice listing via get_voice API, telephony PCM support - Add MiniMax to TTS auto-detection cascade (after ElevenLabs, before Microsoft) and TTS config section - Remove MiniMax-VL-01, M2, M2.1, M2.5 and variants from TUI picker; keep M2.7 and M2.7-highspeed only (backend routing unchanged) * feat(minimax): trim legacy model catalog to M2.7 only Cherry-picked from temp/feat/minimax-trim-legacy-models (949ed28). Removes MiniMax-VL-01, M2, M2.1, M2.5 and variants from the model catalog, model order, modern model matchers, OAuth config, docs, and tests. Keeps only M2.7 and M2.7-highspeed. Conflicts resolved: - provider-catalog.ts: removed MINIMAX_TUI_MODELS filter (no longer needed since source array is now M2.7-only) - index.ts: kept image generation + speech provider registrations (added by this branch), moved media understanding registrations earlier (as intended by the cherry-picked commit) * fix(minimax): update discovery contract test to reflect M2.7-only catalog Cherry-picked from temp/feat/minimax-trim-legacy-models (2c750cb). * feat(minimax): add web search provider and register in plugin entry * fix(minimax): resolve OAuth credentials for TTS speech provider * MiniMax: remove web search and TTS providers * fix(minimax): throw on empty images array after generation failure * feat(minimax): add image generation provider and trim catalog to M2.7 (#54487) (thanks @liyuan97) --------- Co-authored-by: tars90percent <tars@minimaxi.com> Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
This commit is contained in:
@@ -244,7 +244,7 @@ describe("directive behavior", () => {
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
{ id: "MiniMax-M2.7", name: "MiniMax M2.7" },
|
||||
{ id: "MiniMax-M2.5", name: "MiniMax M2.5" },
|
||||
{ id: "MiniMax-M2.7-highspeed", name: "MiniMax M2.7 Highspeed" },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -124,8 +124,7 @@ describe("directive behavior", () => {
|
||||
workspace: path.join(home, "openclaw"),
|
||||
models: {
|
||||
"minimax/MiniMax-M2.7": {},
|
||||
"minimax/MiniMax-M2.5": {},
|
||||
"minimax/MiniMax-M2.5-highspeed": {},
|
||||
"minimax/MiniMax-M2.7-highspeed": {},
|
||||
"lmstudio/minimax-m2.5-gs32": {},
|
||||
},
|
||||
},
|
||||
@@ -139,7 +138,7 @@ describe("directive behavior", () => {
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
makeModelDefinition("MiniMax-M2.7", "MiniMax M2.7"),
|
||||
makeModelDefinition("MiniMax-M2.5", "MiniMax M2.5"),
|
||||
makeModelDefinition("MiniMax-M2.7-highspeed", "MiniMax M2.7 Highspeed"),
|
||||
],
|
||||
},
|
||||
lmstudio: {
|
||||
@@ -153,11 +152,11 @@ describe("directive behavior", () => {
|
||||
},
|
||||
},
|
||||
{
|
||||
body: "/model minimax/m2.5",
|
||||
body: "/model minimax/highspeed",
|
||||
storePath: path.join(home, "sessions-provider-fuzzy.json"),
|
||||
expectedSelection: {
|
||||
provider: "minimax",
|
||||
model: "MiniMax-M2.5",
|
||||
model: "MiniMax-M2.7-highspeed",
|
||||
},
|
||||
config: {
|
||||
agents: {
|
||||
@@ -166,8 +165,7 @@ describe("directive behavior", () => {
|
||||
workspace: path.join(home, "openclaw"),
|
||||
models: {
|
||||
"minimax/MiniMax-M2.7": {},
|
||||
"minimax/MiniMax-M2.5": {},
|
||||
"minimax/MiniMax-M2.5-highspeed": {},
|
||||
"minimax/MiniMax-M2.7-highspeed": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -180,8 +178,7 @@ describe("directive behavior", () => {
|
||||
api: "anthropic-messages",
|
||||
models: [
|
||||
makeModelDefinition("MiniMax-M2.7", "MiniMax M2.7"),
|
||||
makeModelDefinition("MiniMax-M2.5", "MiniMax M2.5"),
|
||||
makeModelDefinition("MiniMax-M2.5-highspeed", "MiniMax M2.5 Highspeed"),
|
||||
makeModelDefinition("MiniMax-M2.7-highspeed", "MiniMax M2.7 Highspeed"),
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -231,7 +231,7 @@ describe("buildStatusMessage", () => {
|
||||
models: {
|
||||
providers: {
|
||||
"minimax-portal": {
|
||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
||||
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||
},
|
||||
xiaomi: {
|
||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||
@@ -248,9 +248,9 @@ describe("buildStatusMessage", () => {
|
||||
providerOverride: "xiaomi",
|
||||
modelOverride: "mimo-v2-flash",
|
||||
modelProvider: "minimax-portal",
|
||||
model: "MiniMax-M2.5",
|
||||
model: "MiniMax-M2.7",
|
||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||
fallbackNoticeReason: "model not allowed",
|
||||
totalTokens: 49_000,
|
||||
contextTokens: 1_048_576,
|
||||
@@ -263,7 +263,7 @@ describe("buildStatusMessage", () => {
|
||||
});
|
||||
|
||||
const normalized = normalizeTestText(text);
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.5");
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.7");
|
||||
expect(normalized).toContain("Context: 49k/200k");
|
||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||
});
|
||||
@@ -274,7 +274,7 @@ describe("buildStatusMessage", () => {
|
||||
models: {
|
||||
providers: {
|
||||
"minimax-portal": {
|
||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
||||
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||
},
|
||||
xiaomi: {
|
||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||
@@ -292,9 +292,9 @@ describe("buildStatusMessage", () => {
|
||||
providerOverride: "xiaomi",
|
||||
modelOverride: "mimo-v2-flash",
|
||||
modelProvider: "minimax-portal",
|
||||
model: "MiniMax-M2.5",
|
||||
model: "MiniMax-M2.7",
|
||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||
fallbackNoticeReason: "model not allowed",
|
||||
totalTokens: 49_000,
|
||||
contextTokens: 1_048_576,
|
||||
@@ -307,7 +307,7 @@ describe("buildStatusMessage", () => {
|
||||
});
|
||||
|
||||
const normalized = normalizeTestText(text);
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.5");
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.7");
|
||||
expect(normalized).toContain("Context: 49k/123k");
|
||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||
expect(normalized).not.toContain("Context: 49k/200k");
|
||||
@@ -319,7 +319,7 @@ describe("buildStatusMessage", () => {
|
||||
models: {
|
||||
providers: {
|
||||
"minimax-portal": {
|
||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
||||
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||
},
|
||||
xiaomi: {
|
||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||
@@ -336,9 +336,9 @@ describe("buildStatusMessage", () => {
|
||||
providerOverride: "xiaomi",
|
||||
modelOverride: "mimo-v2-flash",
|
||||
modelProvider: "minimax-portal",
|
||||
model: "MiniMax-M2.5",
|
||||
model: "MiniMax-M2.7",
|
||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||
fallbackNoticeReason: "model not allowed",
|
||||
totalTokens: 49_000,
|
||||
contextTokens: 123_456,
|
||||
@@ -351,7 +351,7 @@ describe("buildStatusMessage", () => {
|
||||
});
|
||||
|
||||
const normalized = normalizeTestText(text);
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.5");
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.7");
|
||||
expect(normalized).toContain("Context: 49k/123k");
|
||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||
expect(normalized).not.toContain("Context: 49k/200k");
|
||||
@@ -363,7 +363,7 @@ describe("buildStatusMessage", () => {
|
||||
models: {
|
||||
providers: {
|
||||
"minimax-portal": {
|
||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
||||
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||
},
|
||||
xiaomi: {
|
||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||
@@ -382,9 +382,9 @@ describe("buildStatusMessage", () => {
|
||||
providerOverride: "xiaomi",
|
||||
modelOverride: "mimo-v2-flash",
|
||||
modelProvider: "minimax-portal",
|
||||
model: "MiniMax-M2.5",
|
||||
model: "MiniMax-M2.7",
|
||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||
fallbackNoticeReason: "model not allowed",
|
||||
totalTokens: 49_000,
|
||||
},
|
||||
@@ -396,7 +396,7 @@ describe("buildStatusMessage", () => {
|
||||
});
|
||||
|
||||
const normalized = normalizeTestText(text);
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.5");
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.7");
|
||||
expect(normalized).toContain("Context: 49k/120k");
|
||||
expect(normalized).not.toContain("Context: 49k/200k");
|
||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||
@@ -408,7 +408,7 @@ describe("buildStatusMessage", () => {
|
||||
models: {
|
||||
providers: {
|
||||
"minimax-portal": {
|
||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
||||
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||
},
|
||||
xiaomi: {
|
||||
models: [{ id: "mimo-v2-flash", contextWindow: 128_000 }],
|
||||
@@ -427,9 +427,9 @@ describe("buildStatusMessage", () => {
|
||||
providerOverride: "xiaomi",
|
||||
modelOverride: "mimo-v2-flash",
|
||||
modelProvider: "minimax-portal",
|
||||
model: "MiniMax-M2.5",
|
||||
model: "MiniMax-M2.7",
|
||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||
fallbackNoticeReason: "model not allowed",
|
||||
totalTokens: 49_000,
|
||||
},
|
||||
@@ -441,7 +441,7 @@ describe("buildStatusMessage", () => {
|
||||
});
|
||||
|
||||
const normalized = normalizeTestText(text);
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.5");
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.7");
|
||||
expect(normalized).toContain("Context: 49k/128k");
|
||||
expect(normalized).not.toContain("Context: 49k/200k");
|
||||
});
|
||||
@@ -452,7 +452,7 @@ describe("buildStatusMessage", () => {
|
||||
models: {
|
||||
providers: {
|
||||
"minimax-portal": {
|
||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
||||
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||
},
|
||||
xiaomi: {
|
||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||
@@ -471,9 +471,9 @@ describe("buildStatusMessage", () => {
|
||||
providerOverride: "xiaomi",
|
||||
modelOverride: "mimo-v2-flash",
|
||||
modelProvider: "minimax-portal",
|
||||
model: "MiniMax-M2.5",
|
||||
model: "MiniMax-M2.7",
|
||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||
fallbackNoticeReason: "model not allowed",
|
||||
totalTokens: 49_000,
|
||||
},
|
||||
@@ -485,7 +485,7 @@ describe("buildStatusMessage", () => {
|
||||
});
|
||||
|
||||
const normalized = normalizeTestText(text);
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.5");
|
||||
expect(normalized).toContain("Fallback: minimax-portal/MiniMax-M2.7");
|
||||
expect(normalized).toContain("Context: 49k/200k");
|
||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user