fix(models): align minimax and zai defaults (#2445)

Update the coding-agent default model picks for ZAI, Cerebras,
and MiniMax so new sessions prefer the current model lineup.

Add the missing MiniMax-M2.1-highspeed direct provider entries
and normalize MiniMax Anthropic-compatible context limits so the
catalog matches the provider's supported model set.
This commit is contained in:
简简简简
2026-03-20 17:00:57 +08:00
committed by GitHub
parent c2a42e3215
commit 8705fbee54
4 changed files with 89 additions and 8 deletions

View File

@@ -914,6 +914,46 @@ async function generateModels() {
});
}
const minimaxDirectProviders = ["minimax", "minimax-cn"] as const;
const minimaxAnthropicIds = new Set([
"MiniMax-M2",
"MiniMax-M2.1",
"MiniMax-M2.1-highspeed",
"MiniMax-M2.5",
"MiniMax-M2.5-highspeed",
"MiniMax-M2.7",
"MiniMax-M2.7-highspeed",
]);
for (const candidate of allModels) {
if (
(candidate.provider === "minimax" || candidate.provider === "minimax-cn") &&
minimaxAnthropicIds.has(candidate.id)
) {
candidate.contextWindow = 204800;
candidate.maxTokens = 131072;
}
}
for (const provider of minimaxDirectProviders) {
const baseModel = allModels.find((m) => m.provider === provider && m.id === "MiniMax-M2.1");
if (!baseModel) continue;
if (allModels.some((m) => m.provider === provider && m.id === "MiniMax-M2.1-highspeed")) continue;
allModels.push({
...baseModel,
id: "MiniMax-M2.1-highspeed",
name: "MiniMax-M2.1-highspeed",
cost: {
...baseModel.cost,
input: baseModel.cost.input * 2,
output: baseModel.cost.output * 2,
},
contextWindow: 204800,
maxTokens: 131072,
});
}
// OpenAI Codex (ChatGPT OAuth) models
// NOTE: These are not fetched from models.dev; we keep a small, explicit list to avoid aliases.
// Context window is based on observed server limits (400s above ~272k), not marketing numbers.