Skip to content

Commit 826d3bd

Browse files
committed
feat: add MiniMax-M2.7 model to provider registry
Adds MiniMax-M2.7 with the following specs: - Context window: 204,800 tokens - Max output: 131,072 tokens - Input price: $0.30/M tokens - Output price: $1.20/M tokens - Prompt caching: supported - Images: not supported Closes #11981
1 parent 137d3f4 commit 826d3bd

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

packages/types/src/providers/minimax.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ export type MinimaxModelId = keyof typeof minimaxModels
88
export const minimaxDefaultModelId: MinimaxModelId = "MiniMax-M2.5"
99

1010
export const minimaxModels = {
11+
"MiniMax-M2.7": {
12+
maxTokens: 131_072,
13+
contextWindow: 204_800,
14+
supportsImages: false,
15+
supportsPromptCache: true,
16+
includedTools: ["search_and_replace"],
17+
excludedTools: ["apply_diff"],
18+
preserveReasoning: true,
19+
inputPrice: 0.3,
20+
outputPrice: 1.2,
21+
cacheWritesPrice: 0.375,
22+
cacheReadsPrice: 0.03,
23+
description:
24+
"MiniMax M2.7, the newest MiniMax model with further enhanced coding and agentic capabilities, building on the strengths of the M2 series with a larger output window.",
25+
},
1126
"MiniMax-M2.5": {
1227
maxTokens: 16_384,
1328
contextWindow: 204_800,

src/api/providers/__tests__/minimax.spec.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,23 @@ describe("MiniMaxHandler", () => {
8787
expect(model.info).toEqual(minimaxModels[testModelId])
8888
})
8989

90+
it("should return MiniMax-M2.7 model with correct configuration", () => {
91+
const testModelId: MinimaxModelId = "MiniMax-M2.7"
92+
const handlerWithModel = new MiniMaxHandler({
93+
apiModelId: testModelId,
94+
minimaxApiKey: "test-minimax-api-key",
95+
})
96+
const model = handlerWithModel.getModel()
97+
expect(model.id).toBe(testModelId)
98+
expect(model.info).toEqual(minimaxModels[testModelId])
99+
expect(model.info.contextWindow).toBe(204_800)
100+
expect(model.info.maxTokens).toBe(131_072)
101+
expect(model.info.supportsPromptCache).toBe(true)
102+
expect(model.info.supportsImages).toBe(false)
103+
expect(model.info.cacheWritesPrice).toBe(0.375)
104+
expect(model.info.cacheReadsPrice).toBe(0.03)
105+
})
106+
90107
it("should return MiniMax-M2.5 model with correct configuration", () => {
91108
const testModelId: MinimaxModelId = "MiniMax-M2.5"
92109
const handlerWithModel = new MiniMaxHandler({
@@ -396,6 +413,18 @@ describe("MiniMaxHandler", () => {
396413
})
397414

398415
describe("Model Configuration", () => {
416+
it("should correctly configure MiniMax-M2.7 model properties", () => {
417+
const model = minimaxModels["MiniMax-M2.7"]
418+
expect(model.maxTokens).toBe(131_072)
419+
expect(model.contextWindow).toBe(204_800)
420+
expect(model.supportsImages).toBe(false)
421+
expect(model.supportsPromptCache).toBe(true)
422+
expect(model.inputPrice).toBe(0.3)
423+
expect(model.outputPrice).toBe(1.2)
424+
expect(model.cacheWritesPrice).toBe(0.375)
425+
expect(model.cacheReadsPrice).toBe(0.03)
426+
})
427+
399428
it("should correctly configure MiniMax-M2 model properties", () => {
400429
const model = minimaxModels["MiniMax-M2"]
401430
expect(model.maxTokens).toBe(16_384)

0 commit comments

Comments
 (0)