mirror of https://github.com/openclaw/openclaw.git
feat(minimax): trim legacy model catalog to M2.7 only
This commit is contained in:
parent
60cd98a841
commit
949ed283b3
|
|
@ -2153,9 +2153,8 @@ Quick answers plus deeper troubleshooting for real-world setups (local dev, VPS,
|
||||||
1. Upgrade to a current OpenClaw release (or run from source `main`), then restart the gateway.
|
1. Upgrade to a current OpenClaw release (or run from source `main`), then restart the gateway.
|
||||||
2. Make sure MiniMax is configured (wizard or JSON), or that a MiniMax API key
|
2. Make sure MiniMax is configured (wizard or JSON), or that a MiniMax API key
|
||||||
exists in env/auth profiles so the provider can be injected.
|
exists in env/auth profiles so the provider can be injected.
|
||||||
3. Use the exact model id (case-sensitive): `minimax/MiniMax-M2.7`,
|
3. Use the exact model id (case-sensitive): `minimax/MiniMax-M2.7` or
|
||||||
`minimax/MiniMax-M2.7-highspeed`, `minimax/MiniMax-M2.5`, or
|
`minimax/MiniMax-M2.7-highspeed`.
|
||||||
`minimax/MiniMax-M2.5-highspeed`.
|
|
||||||
4. Run:
|
4. Run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,12 @@ title: "MiniMax"
|
||||||
|
|
||||||
# MiniMax
|
# MiniMax
|
||||||
|
|
||||||
OpenClaw's MiniMax provider defaults to **MiniMax M2.7** and keeps
|
OpenClaw's MiniMax provider defaults to **MiniMax M2.7**.
|
||||||
**MiniMax M2.5** in the catalog for compatibility.
|
|
||||||
|
|
||||||
## Model lineup
|
## Model lineup
|
||||||
|
|
||||||
- `MiniMax-M2.7`: default hosted text model.
|
- `MiniMax-M2.7`: default hosted text model.
|
||||||
- `MiniMax-M2.7-highspeed`: faster M2.7 text tier.
|
- `MiniMax-M2.7-highspeed`: faster M2.7 text tier.
|
||||||
- `MiniMax-M2.5`: previous text model, still available in the MiniMax catalog.
|
|
||||||
- `MiniMax-M2.5-highspeed`: faster M2.5 text tier.
|
|
||||||
- `MiniMax-VL-01`: vision model for text + image inputs.
|
|
||||||
|
|
||||||
## Choose a setup
|
## Choose a setup
|
||||||
|
|
||||||
|
|
@ -80,24 +76,6 @@ Configure via CLI:
|
||||||
contextWindow: 200000,
|
contextWindow: 200000,
|
||||||
maxTokens: 8192,
|
maxTokens: 8192,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "MiniMax-M2.5",
|
|
||||||
name: "MiniMax M2.5",
|
|
||||||
reasoning: true,
|
|
||||||
input: ["text"],
|
|
||||||
cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.12 },
|
|
||||||
contextWindow: 200000,
|
|
||||||
maxTokens: 8192,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "MiniMax-M2.5-highspeed",
|
|
||||||
name: "MiniMax M2.5 Highspeed",
|
|
||||||
reasoning: true,
|
|
||||||
input: ["text"],
|
|
||||||
cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.12 },
|
|
||||||
contextWindow: 200000,
|
|
||||||
maxTokens: 8192,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -128,46 +106,6 @@ Example below uses Opus as a concrete primary; swap to your preferred latest-gen
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Optional: Local via LM Studio (manual)
|
|
||||||
|
|
||||||
**Best for:** local inference with LM Studio.
|
|
||||||
We have seen strong results with MiniMax M2.5 on powerful hardware (e.g. a
|
|
||||||
desktop/server) using LM Studio's local server.
|
|
||||||
|
|
||||||
Configure manually via `openclaw.json`:
|
|
||||||
|
|
||||||
```json5
|
|
||||||
{
|
|
||||||
agents: {
|
|
||||||
defaults: {
|
|
||||||
model: { primary: "lmstudio/minimax-m2.5-gs32" },
|
|
||||||
models: { "lmstudio/minimax-m2.5-gs32": { alias: "Minimax" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
models: {
|
|
||||||
mode: "merge",
|
|
||||||
providers: {
|
|
||||||
lmstudio: {
|
|
||||||
baseUrl: "http://127.0.0.1:1234/v1",
|
|
||||||
apiKey: "lmstudio",
|
|
||||||
api: "openai-responses",
|
|
||||||
models: [
|
|
||||||
{
|
|
||||||
id: "minimax-m2.5-gs32",
|
|
||||||
name: "MiniMax M2.5 GS32",
|
|
||||||
reasoning: true,
|
|
||||||
input: ["text"],
|
|
||||||
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
||||||
contextWindow: 196608,
|
|
||||||
maxTokens: 8192,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configure via `openclaw configure`
|
## Configure via `openclaw configure`
|
||||||
|
|
||||||
Use the interactive config wizard to set MiniMax without editing JSON:
|
Use the interactive config wizard to set MiniMax without editing JSON:
|
||||||
|
|
@ -190,7 +128,7 @@ Use the interactive config wizard to set MiniMax without editing JSON:
|
||||||
|
|
||||||
- Model refs are `minimax/<model>`.
|
- Model refs are `minimax/<model>`.
|
||||||
- Default text model: `MiniMax-M2.7`.
|
- Default text model: `MiniMax-M2.7`.
|
||||||
- Alternate text models: `MiniMax-M2.7-highspeed`, `MiniMax-M2.5`, `MiniMax-M2.5-highspeed`.
|
- Alternate text model: `MiniMax-M2.7-highspeed`.
|
||||||
- Coding Plan usage API: `https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains` (requires a coding plan key).
|
- Coding Plan usage API: `https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains` (requires a coding plan key).
|
||||||
- Update pricing values in `models.json` if you need exact cost tracking.
|
- Update pricing values in `models.json` if you need exact cost tracking.
|
||||||
- Referral link for MiniMax Coding Plan (10% off): [https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link](https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link)
|
- Referral link for MiniMax Coding Plan (10% off): [https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link](https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link)
|
||||||
|
|
@ -214,8 +152,6 @@ Make sure the model id is **case‑sensitive**:
|
||||||
|
|
||||||
- `minimax/MiniMax-M2.7`
|
- `minimax/MiniMax-M2.7`
|
||||||
- `minimax/MiniMax-M2.7-highspeed`
|
- `minimax/MiniMax-M2.7-highspeed`
|
||||||
- `minimax/MiniMax-M2.5`
|
|
||||||
- `minimax/MiniMax-M2.5-highspeed`
|
|
||||||
|
|
||||||
Then recheck with:
|
Then recheck with:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,22 +130,10 @@ function createOAuthHandler(region: MiniMaxRegion) {
|
||||||
agents: {
|
agents: {
|
||||||
defaults: {
|
defaults: {
|
||||||
models: {
|
models: {
|
||||||
[portalModelRef("MiniMax-M2")]: { alias: "minimax-m2" },
|
|
||||||
[portalModelRef("MiniMax-M2.1")]: { alias: "minimax-m2.1" },
|
|
||||||
[portalModelRef("MiniMax-M2.1-highspeed")]: {
|
|
||||||
alias: "minimax-m2.1-highspeed",
|
|
||||||
},
|
|
||||||
[portalModelRef("MiniMax-M2.7")]: { alias: "minimax-m2.7" },
|
[portalModelRef("MiniMax-M2.7")]: { alias: "minimax-m2.7" },
|
||||||
[portalModelRef("MiniMax-M2.7-highspeed")]: {
|
[portalModelRef("MiniMax-M2.7-highspeed")]: {
|
||||||
alias: "minimax-m2.7-highspeed",
|
alias: "minimax-m2.7-highspeed",
|
||||||
},
|
},
|
||||||
[portalModelRef("MiniMax-M2.5")]: { alias: "minimax-m2.5" },
|
|
||||||
[portalModelRef("MiniMax-M2.5-highspeed")]: {
|
|
||||||
alias: "minimax-m2.5-highspeed",
|
|
||||||
},
|
|
||||||
[portalModelRef("MiniMax-M2.5-Lightning")]: {
|
|
||||||
alias: "minimax-m2.5-lightning",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -243,6 +231,9 @@ export default definePluginEntry({
|
||||||
await fetchMinimaxUsage(ctx.token, ctx.timeoutMs, ctx.fetchFn),
|
await fetchMinimaxUsage(ctx.token, ctx.timeoutMs, ctx.fetchFn),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
api.registerMediaUnderstandingProvider(minimaxMediaUnderstandingProvider);
|
||||||
|
api.registerMediaUnderstandingProvider(minimaxPortalMediaUnderstandingProvider);
|
||||||
|
|
||||||
api.registerProvider({
|
api.registerProvider({
|
||||||
id: PORTAL_PROVIDER_ID,
|
id: PORTAL_PROVIDER_ID,
|
||||||
label: PROVIDER_LABEL,
|
label: PROVIDER_LABEL,
|
||||||
|
|
@ -285,7 +276,5 @@ export default definePluginEntry({
|
||||||
],
|
],
|
||||||
isModernModelRef: ({ modelId }) => isMiniMaxModernModelId(modelId),
|
isModernModelRef: ({ modelId }) => isMiniMaxModernModelId(modelId),
|
||||||
});
|
});
|
||||||
api.registerMediaUnderstandingProvider(minimaxMediaUnderstandingProvider);
|
|
||||||
api.registerMediaUnderstandingProvider(minimaxPortalMediaUnderstandingProvider);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,14 @@ describe("minimax model definitions", () => {
|
||||||
|
|
||||||
it("builds catalog model with name and reasoning from catalog", () => {
|
it("builds catalog model with name and reasoning from catalog", () => {
|
||||||
const model = buildMinimaxModelDefinition({
|
const model = buildMinimaxModelDefinition({
|
||||||
id: "MiniMax-M2.1",
|
id: "MiniMax-M2.7",
|
||||||
cost: MINIMAX_API_COST,
|
cost: MINIMAX_API_COST,
|
||||||
contextWindow: DEFAULT_MINIMAX_CONTEXT_WINDOW,
|
contextWindow: DEFAULT_MINIMAX_CONTEXT_WINDOW,
|
||||||
maxTokens: DEFAULT_MINIMAX_MAX_TOKENS,
|
maxTokens: DEFAULT_MINIMAX_MAX_TOKENS,
|
||||||
});
|
});
|
||||||
expect(model).toMatchObject({
|
expect(model).toMatchObject({
|
||||||
id: "MiniMax-M2.1",
|
id: "MiniMax-M2.7",
|
||||||
name: "MiniMax M2.1",
|
name: "MiniMax M2.7",
|
||||||
reasoning: true,
|
reasoning: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import {
|
||||||
} from "openclaw/plugin-sdk/provider-models";
|
} from "openclaw/plugin-sdk/provider-models";
|
||||||
|
|
||||||
const MINIMAX_PORTAL_BASE_URL = "https://api.minimax.io/anthropic";
|
const MINIMAX_PORTAL_BASE_URL = "https://api.minimax.io/anthropic";
|
||||||
const MINIMAX_DEFAULT_VISION_MODEL_ID = "MiniMax-VL-01";
|
|
||||||
const MINIMAX_DEFAULT_CONTEXT_WINDOW = 204800;
|
const MINIMAX_DEFAULT_CONTEXT_WINDOW = 204800;
|
||||||
const MINIMAX_DEFAULT_MAX_TOKENS = 131072;
|
const MINIMAX_DEFAULT_MAX_TOKENS = 131072;
|
||||||
const MINIMAX_API_COST = {
|
const MINIMAX_API_COST = {
|
||||||
|
|
@ -45,22 +44,14 @@ function buildMinimaxTextModel(params: {
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildMinimaxCatalog(): ModelDefinitionConfig[] {
|
function buildMinimaxCatalog(): ModelDefinitionConfig[] {
|
||||||
return [
|
return MINIMAX_TEXT_MODEL_ORDER.map((id) => {
|
||||||
buildMinimaxModel({
|
const model = MINIMAX_TEXT_MODEL_CATALOG[id];
|
||||||
id: MINIMAX_DEFAULT_VISION_MODEL_ID,
|
return buildMinimaxTextModel({
|
||||||
name: "MiniMax VL 01",
|
id,
|
||||||
reasoning: false,
|
name: model.name,
|
||||||
input: ["text", "image"],
|
reasoning: model.reasoning,
|
||||||
}),
|
});
|
||||||
...MINIMAX_TEXT_MODEL_ORDER.map((id) => {
|
});
|
||||||
const model = MINIMAX_TEXT_MODEL_CATALOG[id];
|
|
||||||
return buildMinimaxTextModel({
|
|
||||||
id,
|
|
||||||
name: model.name,
|
|
||||||
reasoning: model.reasoning,
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function buildMinimaxProvider(): ModelProviderConfig {
|
export function buildMinimaxProvider(): ModelProviderConfig {
|
||||||
|
|
|
||||||
|
|
@ -36,18 +36,12 @@ describe("minimax provider catalog", () => {
|
||||||
|
|
||||||
const providers = await resolveImplicitProvidersForTest({ agentDir });
|
const providers = await resolveImplicitProvidersForTest({ agentDir });
|
||||||
expect(providers?.minimax?.models?.map((model) => model.id)).toEqual([
|
expect(providers?.minimax?.models?.map((model) => model.id)).toEqual([
|
||||||
"MiniMax-VL-01",
|
|
||||||
"MiniMax-M2.7",
|
"MiniMax-M2.7",
|
||||||
"MiniMax-M2.7-highspeed",
|
"MiniMax-M2.7-highspeed",
|
||||||
"MiniMax-M2.5",
|
|
||||||
"MiniMax-M2.5-highspeed",
|
|
||||||
]);
|
]);
|
||||||
expect(providers?.["minimax-portal"]?.models?.map((model) => model.id)).toEqual([
|
expect(providers?.["minimax-portal"]?.models?.map((model) => model.id)).toEqual([
|
||||||
"MiniMax-VL-01",
|
|
||||||
"MiniMax-M2.7",
|
"MiniMax-M2.7",
|
||||||
"MiniMax-M2.7-highspeed",
|
"MiniMax-M2.7-highspeed",
|
||||||
"MiniMax-M2.5",
|
|
||||||
"MiniMax-M2.5-highspeed",
|
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1869,20 +1869,20 @@ describe("applyExtraParamsToAgent", () => {
|
||||||
expect(resolvedModelId).toBe("MiniMax-M2.7-highspeed");
|
expect(resolvedModelId).toBe("MiniMax-M2.7-highspeed");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("maps MiniMax M2.1 /fast to the matching highspeed model", () => {
|
it("maps MiniMax M2.7 /fast to the matching highspeed model", () => {
|
||||||
const resolvedModelId = runResolvedModelIdCase({
|
const resolvedModelId = runResolvedModelIdCase({
|
||||||
applyProvider: "minimax",
|
applyProvider: "minimax",
|
||||||
applyModelId: "MiniMax-M2.1",
|
applyModelId: "MiniMax-M2.7",
|
||||||
extraParamsOverride: { fastMode: true },
|
extraParamsOverride: { fastMode: true },
|
||||||
model: {
|
model: {
|
||||||
api: "anthropic-messages",
|
api: "anthropic-messages",
|
||||||
provider: "minimax",
|
provider: "minimax",
|
||||||
id: "MiniMax-M2.1",
|
id: "MiniMax-M2.7",
|
||||||
baseUrl: "https://api.minimax.io/anthropic",
|
baseUrl: "https://api.minimax.io/anthropic",
|
||||||
} as Model<"anthropic-messages">,
|
} as Model<"anthropic-messages">,
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(resolvedModelId).toBe("MiniMax-M2.1-highspeed");
|
expect(resolvedModelId).toBe("MiniMax-M2.7-highspeed");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("keeps explicit MiniMax highspeed models unchanged when /fast is off", () => {
|
it("keeps explicit MiniMax highspeed models unchanged when /fast is off", () => {
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ import type { StreamFn } from "@mariozechner/pi-agent-core";
|
||||||
import { streamSimple } from "@mariozechner/pi-ai";
|
import { streamSimple } from "@mariozechner/pi-ai";
|
||||||
|
|
||||||
const MINIMAX_FAST_MODEL_IDS = new Map<string, string>([
|
const MINIMAX_FAST_MODEL_IDS = new Map<string, string>([
|
||||||
["MiniMax-M2.1", "MiniMax-M2.1-highspeed"],
|
|
||||||
["MiniMax-M2.5", "MiniMax-M2.5-highspeed"],
|
|
||||||
["MiniMax-M2.7", "MiniMax-M2.7-highspeed"],
|
["MiniMax-M2.7", "MiniMax-M2.7-highspeed"],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ describe("directive behavior", () => {
|
||||||
api: "anthropic-messages",
|
api: "anthropic-messages",
|
||||||
models: [
|
models: [
|
||||||
{ id: "MiniMax-M2.7", name: "MiniMax M2.7" },
|
{ 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"),
|
workspace: path.join(home, "openclaw"),
|
||||||
models: {
|
models: {
|
||||||
"minimax/MiniMax-M2.7": {},
|
"minimax/MiniMax-M2.7": {},
|
||||||
"minimax/MiniMax-M2.5": {},
|
"minimax/MiniMax-M2.7-highspeed": {},
|
||||||
"minimax/MiniMax-M2.5-highspeed": {},
|
|
||||||
"lmstudio/minimax-m2.5-gs32": {},
|
"lmstudio/minimax-m2.5-gs32": {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -139,7 +138,7 @@ describe("directive behavior", () => {
|
||||||
api: "anthropic-messages",
|
api: "anthropic-messages",
|
||||||
models: [
|
models: [
|
||||||
makeModelDefinition("MiniMax-M2.7", "MiniMax M2.7"),
|
makeModelDefinition("MiniMax-M2.7", "MiniMax M2.7"),
|
||||||
makeModelDefinition("MiniMax-M2.5", "MiniMax M2.5"),
|
makeModelDefinition("MiniMax-M2.7-highspeed", "MiniMax M2.7 Highspeed"),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
lmstudio: {
|
lmstudio: {
|
||||||
|
|
@ -153,7 +152,7 @@ describe("directive behavior", () => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
body: "/model minimax/m2.5",
|
body: "/model minimax/m2.7",
|
||||||
storePath: path.join(home, "sessions-provider-fuzzy.json"),
|
storePath: path.join(home, "sessions-provider-fuzzy.json"),
|
||||||
expectedSelection: {
|
expectedSelection: {
|
||||||
provider: "minimax",
|
provider: "minimax",
|
||||||
|
|
@ -166,8 +165,7 @@ describe("directive behavior", () => {
|
||||||
workspace: path.join(home, "openclaw"),
|
workspace: path.join(home, "openclaw"),
|
||||||
models: {
|
models: {
|
||||||
"minimax/MiniMax-M2.7": {},
|
"minimax/MiniMax-M2.7": {},
|
||||||
"minimax/MiniMax-M2.5": {},
|
"minimax/MiniMax-M2.7-highspeed": {},
|
||||||
"minimax/MiniMax-M2.5-highspeed": {},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -180,8 +178,7 @@ describe("directive behavior", () => {
|
||||||
api: "anthropic-messages",
|
api: "anthropic-messages",
|
||||||
models: [
|
models: [
|
||||||
makeModelDefinition("MiniMax-M2.7", "MiniMax M2.7"),
|
makeModelDefinition("MiniMax-M2.7", "MiniMax M2.7"),
|
||||||
makeModelDefinition("MiniMax-M2.5", "MiniMax M2.5"),
|
makeModelDefinition("MiniMax-M2.7-highspeed", "MiniMax M2.7 Highspeed"),
|
||||||
makeModelDefinition("MiniMax-M2.5-highspeed", "MiniMax M2.5 Highspeed"),
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -231,7 +231,7 @@ describe("buildStatusMessage", () => {
|
||||||
models: {
|
models: {
|
||||||
providers: {
|
providers: {
|
||||||
"minimax-portal": {
|
"minimax-portal": {
|
||||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||||
},
|
},
|
||||||
xiaomi: {
|
xiaomi: {
|
||||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||||
|
|
@ -248,9 +248,9 @@ describe("buildStatusMessage", () => {
|
||||||
providerOverride: "xiaomi",
|
providerOverride: "xiaomi",
|
||||||
modelOverride: "mimo-v2-flash",
|
modelOverride: "mimo-v2-flash",
|
||||||
modelProvider: "minimax-portal",
|
modelProvider: "minimax-portal",
|
||||||
model: "MiniMax-M2.5",
|
model: "MiniMax-M2.7",
|
||||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||||
fallbackNoticeReason: "model not allowed",
|
fallbackNoticeReason: "model not allowed",
|
||||||
totalTokens: 49_000,
|
totalTokens: 49_000,
|
||||||
contextTokens: 1_048_576,
|
contextTokens: 1_048_576,
|
||||||
|
|
@ -263,7 +263,7 @@ describe("buildStatusMessage", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const normalized = normalizeTestText(text);
|
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).toContain("Context: 49k/200k");
|
||||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||||
});
|
});
|
||||||
|
|
@ -274,7 +274,7 @@ describe("buildStatusMessage", () => {
|
||||||
models: {
|
models: {
|
||||||
providers: {
|
providers: {
|
||||||
"minimax-portal": {
|
"minimax-portal": {
|
||||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||||
},
|
},
|
||||||
xiaomi: {
|
xiaomi: {
|
||||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||||
|
|
@ -292,9 +292,9 @@ describe("buildStatusMessage", () => {
|
||||||
providerOverride: "xiaomi",
|
providerOverride: "xiaomi",
|
||||||
modelOverride: "mimo-v2-flash",
|
modelOverride: "mimo-v2-flash",
|
||||||
modelProvider: "minimax-portal",
|
modelProvider: "minimax-portal",
|
||||||
model: "MiniMax-M2.5",
|
model: "MiniMax-M2.7",
|
||||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||||
fallbackNoticeReason: "model not allowed",
|
fallbackNoticeReason: "model not allowed",
|
||||||
totalTokens: 49_000,
|
totalTokens: 49_000,
|
||||||
contextTokens: 1_048_576,
|
contextTokens: 1_048_576,
|
||||||
|
|
@ -307,7 +307,7 @@ describe("buildStatusMessage", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const normalized = normalizeTestText(text);
|
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).toContain("Context: 49k/123k");
|
||||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||||
expect(normalized).not.toContain("Context: 49k/200k");
|
expect(normalized).not.toContain("Context: 49k/200k");
|
||||||
|
|
@ -319,7 +319,7 @@ describe("buildStatusMessage", () => {
|
||||||
models: {
|
models: {
|
||||||
providers: {
|
providers: {
|
||||||
"minimax-portal": {
|
"minimax-portal": {
|
||||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||||
},
|
},
|
||||||
xiaomi: {
|
xiaomi: {
|
||||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||||
|
|
@ -336,9 +336,9 @@ describe("buildStatusMessage", () => {
|
||||||
providerOverride: "xiaomi",
|
providerOverride: "xiaomi",
|
||||||
modelOverride: "mimo-v2-flash",
|
modelOverride: "mimo-v2-flash",
|
||||||
modelProvider: "minimax-portal",
|
modelProvider: "minimax-portal",
|
||||||
model: "MiniMax-M2.5",
|
model: "MiniMax-M2.7",
|
||||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||||
fallbackNoticeReason: "model not allowed",
|
fallbackNoticeReason: "model not allowed",
|
||||||
totalTokens: 49_000,
|
totalTokens: 49_000,
|
||||||
contextTokens: 123_456,
|
contextTokens: 123_456,
|
||||||
|
|
@ -351,7 +351,7 @@ describe("buildStatusMessage", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const normalized = normalizeTestText(text);
|
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).toContain("Context: 49k/123k");
|
||||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||||
expect(normalized).not.toContain("Context: 49k/200k");
|
expect(normalized).not.toContain("Context: 49k/200k");
|
||||||
|
|
@ -363,7 +363,7 @@ describe("buildStatusMessage", () => {
|
||||||
models: {
|
models: {
|
||||||
providers: {
|
providers: {
|
||||||
"minimax-portal": {
|
"minimax-portal": {
|
||||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||||
},
|
},
|
||||||
xiaomi: {
|
xiaomi: {
|
||||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||||
|
|
@ -382,9 +382,9 @@ describe("buildStatusMessage", () => {
|
||||||
providerOverride: "xiaomi",
|
providerOverride: "xiaomi",
|
||||||
modelOverride: "mimo-v2-flash",
|
modelOverride: "mimo-v2-flash",
|
||||||
modelProvider: "minimax-portal",
|
modelProvider: "minimax-portal",
|
||||||
model: "MiniMax-M2.5",
|
model: "MiniMax-M2.7",
|
||||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||||
fallbackNoticeReason: "model not allowed",
|
fallbackNoticeReason: "model not allowed",
|
||||||
totalTokens: 49_000,
|
totalTokens: 49_000,
|
||||||
},
|
},
|
||||||
|
|
@ -396,7 +396,7 @@ describe("buildStatusMessage", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const normalized = normalizeTestText(text);
|
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).toContain("Context: 49k/120k");
|
||||||
expect(normalized).not.toContain("Context: 49k/200k");
|
expect(normalized).not.toContain("Context: 49k/200k");
|
||||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||||
|
|
@ -408,7 +408,7 @@ describe("buildStatusMessage", () => {
|
||||||
models: {
|
models: {
|
||||||
providers: {
|
providers: {
|
||||||
"minimax-portal": {
|
"minimax-portal": {
|
||||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||||
},
|
},
|
||||||
xiaomi: {
|
xiaomi: {
|
||||||
models: [{ id: "mimo-v2-flash", contextWindow: 128_000 }],
|
models: [{ id: "mimo-v2-flash", contextWindow: 128_000 }],
|
||||||
|
|
@ -427,9 +427,9 @@ describe("buildStatusMessage", () => {
|
||||||
providerOverride: "xiaomi",
|
providerOverride: "xiaomi",
|
||||||
modelOverride: "mimo-v2-flash",
|
modelOverride: "mimo-v2-flash",
|
||||||
modelProvider: "minimax-portal",
|
modelProvider: "minimax-portal",
|
||||||
model: "MiniMax-M2.5",
|
model: "MiniMax-M2.7",
|
||||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||||
fallbackNoticeReason: "model not allowed",
|
fallbackNoticeReason: "model not allowed",
|
||||||
totalTokens: 49_000,
|
totalTokens: 49_000,
|
||||||
},
|
},
|
||||||
|
|
@ -441,7 +441,7 @@ describe("buildStatusMessage", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const normalized = normalizeTestText(text);
|
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).toContain("Context: 49k/128k");
|
||||||
expect(normalized).not.toContain("Context: 49k/200k");
|
expect(normalized).not.toContain("Context: 49k/200k");
|
||||||
});
|
});
|
||||||
|
|
@ -452,7 +452,7 @@ describe("buildStatusMessage", () => {
|
||||||
models: {
|
models: {
|
||||||
providers: {
|
providers: {
|
||||||
"minimax-portal": {
|
"minimax-portal": {
|
||||||
models: [{ id: "MiniMax-M2.5", contextWindow: 200_000 }],
|
models: [{ id: "MiniMax-M2.7", contextWindow: 200_000 }],
|
||||||
},
|
},
|
||||||
xiaomi: {
|
xiaomi: {
|
||||||
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
models: [{ id: "mimo-v2-flash", contextWindow: 1_048_576 }],
|
||||||
|
|
@ -471,9 +471,9 @@ describe("buildStatusMessage", () => {
|
||||||
providerOverride: "xiaomi",
|
providerOverride: "xiaomi",
|
||||||
modelOverride: "mimo-v2-flash",
|
modelOverride: "mimo-v2-flash",
|
||||||
modelProvider: "minimax-portal",
|
modelProvider: "minimax-portal",
|
||||||
model: "MiniMax-M2.5",
|
model: "MiniMax-M2.7",
|
||||||
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
fallbackNoticeSelectedModel: "xiaomi/mimo-v2-flash",
|
||||||
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.5",
|
fallbackNoticeActiveModel: "minimax-portal/MiniMax-M2.7",
|
||||||
fallbackNoticeReason: "model not allowed",
|
fallbackNoticeReason: "model not allowed",
|
||||||
totalTokens: 49_000,
|
totalTokens: 49_000,
|
||||||
},
|
},
|
||||||
|
|
@ -485,7 +485,7 @@ describe("buildStatusMessage", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const normalized = normalizeTestText(text);
|
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).toContain("Context: 49k/200k");
|
||||||
expect(normalized).not.toContain("Context: 49k/1.0m");
|
expect(normalized).not.toContain("Context: 49k/1.0m");
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -533,8 +533,8 @@ describe("primary model defaults", () => {
|
||||||
it("sets correct primary model", () => {
|
it("sets correct primary model", () => {
|
||||||
const configCases = [
|
const configCases = [
|
||||||
{
|
{
|
||||||
getConfig: () => applyMinimaxApiConfig({}, "MiniMax-M2.5-highspeed"),
|
getConfig: () => applyMinimaxApiConfig({}, "MiniMax-M2.7-highspeed"),
|
||||||
primaryModel: "minimax/MiniMax-M2.5-highspeed",
|
primaryModel: "minimax/MiniMax-M2.7-highspeed",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
getConfig: () => applyZaiConfig({}, { modelId: "glm-5" }),
|
getConfig: () => applyZaiConfig({}, { modelId: "glm-5" }),
|
||||||
|
|
|
||||||
|
|
@ -3,36 +3,18 @@ import { matchesExactOrPrefix } from "./provider-model-helpers.js";
|
||||||
export const MINIMAX_DEFAULT_MODEL_ID = "MiniMax-M2.7";
|
export const MINIMAX_DEFAULT_MODEL_ID = "MiniMax-M2.7";
|
||||||
export const MINIMAX_DEFAULT_MODEL_REF = `minimax/${MINIMAX_DEFAULT_MODEL_ID}`;
|
export const MINIMAX_DEFAULT_MODEL_REF = `minimax/${MINIMAX_DEFAULT_MODEL_ID}`;
|
||||||
|
|
||||||
export const MINIMAX_TEXT_MODEL_ORDER = [
|
export const MINIMAX_TEXT_MODEL_ORDER = ["MiniMax-M2.7", "MiniMax-M2.7-highspeed"] as const;
|
||||||
"MiniMax-M2",
|
|
||||||
"MiniMax-M2.1",
|
|
||||||
"MiniMax-M2.1-highspeed",
|
|
||||||
"MiniMax-M2.7",
|
|
||||||
"MiniMax-M2.7-highspeed",
|
|
||||||
"MiniMax-M2.5",
|
|
||||||
"MiniMax-M2.5-highspeed",
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
export const MINIMAX_TEXT_MODEL_CATALOG = {
|
export const MINIMAX_TEXT_MODEL_CATALOG = {
|
||||||
"MiniMax-M2": { name: "MiniMax M2", reasoning: true },
|
|
||||||
"MiniMax-M2.1": { name: "MiniMax M2.1", reasoning: true },
|
|
||||||
"MiniMax-M2.1-highspeed": { name: "MiniMax M2.1 Highspeed", reasoning: true },
|
|
||||||
"MiniMax-M2.7": { name: "MiniMax M2.7", reasoning: true },
|
"MiniMax-M2.7": { name: "MiniMax M2.7", reasoning: true },
|
||||||
"MiniMax-M2.7-highspeed": { name: "MiniMax M2.7 Highspeed", reasoning: true },
|
"MiniMax-M2.7-highspeed": { name: "MiniMax M2.7 Highspeed", reasoning: true },
|
||||||
"MiniMax-M2.5": { name: "MiniMax M2.5", reasoning: true },
|
|
||||||
"MiniMax-M2.5-highspeed": { name: "MiniMax M2.5 Highspeed", reasoning: true },
|
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const MINIMAX_TEXT_MODEL_REFS = MINIMAX_TEXT_MODEL_ORDER.map(
|
export const MINIMAX_TEXT_MODEL_REFS = MINIMAX_TEXT_MODEL_ORDER.map(
|
||||||
(modelId) => `minimax/${modelId}`,
|
(modelId) => `minimax/${modelId}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
export const MINIMAX_MODERN_MODEL_MATCHERS = [
|
export const MINIMAX_MODERN_MODEL_MATCHERS = ["minimax-m2.7"] as const;
|
||||||
"minimax-m2",
|
|
||||||
"minimax-m2.1",
|
|
||||||
"minimax-m2.5",
|
|
||||||
"minimax-m2.7",
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
export function isMiniMaxModernModelId(modelId: string): boolean {
|
export function isMiniMaxModernModelId(modelId: string): boolean {
|
||||||
return matchesExactOrPrefix(modelId, MINIMAX_MODERN_MODEL_MATCHERS);
|
return matchesExactOrPrefix(modelId, MINIMAX_MODERN_MODEL_MATCHERS);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue