Add MiniMax provider support (#656 by @dannote)

- Add minimax to KnownProvider and Api types
- Add MINIMAX_API_KEY to getEnvApiKey()
- Generate MiniMax-M2 and MiniMax-M2.1 models
- Add context overflow detection pattern
- Add tests to all required test files
- Update README and CHANGELOG with attribution

Also fixes:
- Bedrock duplicate toolResult ID when content has multiple blocks
- Sandbox extension unused parameter lint warning
This commit is contained in:
Mario Zechner 2026-01-13 02:27:09 +01:00
parent edc576024f
commit 8af8d0d672
20 changed files with 233 additions and 31 deletions

View file

@ -2686,6 +2686,42 @@ export const MODELS = {
maxTokens: 16384,
} satisfies Model<"openai-completions">,
},
"minimax": {
"MiniMax-M2": {
id: "MiniMax-M2",
name: "MiniMax-M2",
api: "anthropic-messages",
provider: "minimax",
baseUrl: "https://api.minimax.io/anthropic",
reasoning: true,
input: ["text"],
cost: {
input: 0.3,
output: 1.2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 196608,
maxTokens: 128000,
} satisfies Model<"anthropic-messages">,
"MiniMax-M2.1": {
id: "MiniMax-M2.1",
name: "MiniMax-M2.1",
api: "anthropic-messages",
provider: "minimax",
baseUrl: "https://api.minimax.io/anthropic",
reasoning: true,
input: ["text"],
cost: {
input: 0.3,
output: 1.2,
cacheRead: 0,
cacheWrite: 0,
},
contextWindow: 204800,
maxTokens: 131072,
} satisfies Model<"anthropic-messages">,
},
"mistral": {
"codestral-latest": {
id: "codestral-latest",
@ -4529,7 +4565,7 @@ export const MODELS = {
cacheWrite: 18.75,
},
contextWindow: 200000,
maxTokens: 4096,
maxTokens: 32000,
} satisfies Model<"openai-completions">,
"anthropic/claude-opus-4.5": {
id: "anthropic/claude-opus-4.5",