Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/add-minimax-models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": minor
---

Add MiniMax-M2.5, MiniMax-M2.5-highspeed and MiniMax-M2.1-highspeed models
51 changes: 51 additions & 0 deletions packages/types/src/providers/minimax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,57 @@ export const minimaxModels = {
description:
"MiniMax M2.1 builds on M2 with improved overall performance for agentic coding tasks and significantly faster response times.",
},
"MiniMax-M2.1-highspeed": {
maxTokens: 16_384,
contextWindow: 192_000,
supportsImages: false,
supportsPromptCache: true,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["search_and_replace"],
excludedTools: ["apply_diff"],
preserveReasoning: true,
inputPrice: 0.6,
outputPrice: 2.4,
cacheWritesPrice: 0.375,
cacheReadsPrice: 0.03,
description:
"(high-speed) MiniMax M2.1 builds on M2 with improved overall performance for agentic coding tasks and significantly faster response times.",
},
"MiniMax-M2.5": {
maxTokens: 16_384,
contextWindow: 192_000,
supportsImages: false,
supportsPromptCache: true,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["search_and_replace"],
excludedTools: ["apply_diff"],
preserveReasoning: true,
inputPrice: 0.3,
outputPrice: 1.2,
cacheWritesPrice: 0.375,
cacheReadsPrice: 0.03,
description:
"MiniMax M2.5 builds on M2.1 with improved overall performance for agentic coding tasks and the same response times.",
},
"MiniMax-M2.5-highspeed": {
maxTokens: 16_384,
contextWindow: 192_000,
supportsImages: false,
supportsPromptCache: true,
supportsNativeTools: true,
defaultToolProtocol: "native",
includedTools: ["search_and_replace"],
excludedTools: ["apply_diff"],
preserveReasoning: true,
inputPrice: 0.6,
outputPrice: 2.4,
cacheWritesPrice: 0.375,
cacheReadsPrice: 0.03,
description:
"(high-speed) MiniMax M2.5 builds on M2.1 with improved overall performance for agentic coding tasks and significantly faster response times.",
},
} as const satisfies Record<string, ModelInfo>

export const minimaxDefaultModelInfo: ModelInfo = minimaxModels[minimaxDefaultModelId]
Expand Down
90 changes: 90 additions & 0 deletions src/api/providers/__tests__/minimax.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,60 @@ describe("MiniMaxHandler", () => {
expect(model.info.cacheWritesPrice).toBe(0.375)
expect(model.info.cacheReadsPrice).toBe(0.03)
})

it("should return MiniMax-M2.1-highspeed model with correct configuration", () => {
const testModelId: MinimaxModelId = "MiniMax-M2.1-highspeed"
const handlerWithModel = new MiniMaxHandler({
apiModelId: testModelId,
minimaxApiKey: "test-minimax-api-key",
})
const model = handlerWithModel.getModel()
expect(model.id).toBe(testModelId)
expect(model.info).toEqual(minimaxModels[testModelId])
expect(model.info.contextWindow).toBe(192_000)
expect(model.info.maxTokens).toBe(16_384)
expect(model.info.supportsPromptCache).toBe(true)
expect(model.info.cacheWritesPrice).toBe(0.375)
expect(model.info.cacheReadsPrice).toBe(0.03)
expect(model.info.inputPrice).toBe(0.6)
expect(model.info.outputPrice).toBe(2.4)
})

it("should return MiniMax-M2.5 model with correct configuration", () => {
const testModelId: MinimaxModelId = "MiniMax-M2.5"
const handlerWithModel = new MiniMaxHandler({
apiModelId: testModelId,
minimaxApiKey: "test-minimax-api-key",
})
const model = handlerWithModel.getModel()
expect(model.id).toBe(testModelId)
expect(model.info).toEqual(minimaxModels[testModelId])
expect(model.info.contextWindow).toBe(192_000)
expect(model.info.maxTokens).toBe(16_384)
expect(model.info.supportsPromptCache).toBe(true)
expect(model.info.cacheWritesPrice).toBe(0.375)
expect(model.info.cacheReadsPrice).toBe(0.03)
expect(model.info.inputPrice).toBe(0.3)
expect(model.info.outputPrice).toBe(1.2)
})

it("should return MiniMax-M2.5-highspeed model with correct configuration", () => {
const testModelId: MinimaxModelId = "MiniMax-M2.5-highspeed"
const handlerWithModel = new MiniMaxHandler({
apiModelId: testModelId,
minimaxApiKey: "test-minimax-api-key",
})
const model = handlerWithModel.getModel()
expect(model.id).toBe(testModelId)
expect(model.info).toEqual(minimaxModels[testModelId])
expect(model.info.contextWindow).toBe(192_000)
expect(model.info.maxTokens).toBe(16_384)
expect(model.info.supportsPromptCache).toBe(true)
expect(model.info.cacheWritesPrice).toBe(0.375)
expect(model.info.cacheReadsPrice).toBe(0.03)
expect(model.info.inputPrice).toBe(0.6)
expect(model.info.outputPrice).toBe(2.4)
})
})

describe("China MiniMax", () => {
Expand Down Expand Up @@ -403,5 +457,41 @@ describe("MiniMaxHandler", () => {
expect(model.cacheWritesPrice).toBe(0.375)
expect(model.cacheReadsPrice).toBe(0.03)
})

it("should correctly configure MiniMax-M2.1-highspeed model properties", () => {
const model = minimaxModels["MiniMax-M2.1-highspeed"]
expect(model.maxTokens).toBe(16_384)
expect(model.contextWindow).toBe(192_000)
expect(model.supportsImages).toBe(false)
expect(model.supportsPromptCache).toBe(true)
expect(model.inputPrice).toBe(0.6)
expect(model.outputPrice).toBe(2.4)
expect(model.cacheWritesPrice).toBe(0.375)
expect(model.cacheReadsPrice).toBe(0.03)
})

it("should correctly configure MiniMax-M2.5 model properties", () => {
const model = minimaxModels["MiniMax-M2.5"]
expect(model.maxTokens).toBe(16_384)
expect(model.contextWindow).toBe(192_000)
expect(model.supportsImages).toBe(false)
expect(model.supportsPromptCache).toBe(true)
expect(model.inputPrice).toBe(0.3)
expect(model.outputPrice).toBe(1.2)
expect(model.cacheWritesPrice).toBe(0.375)
expect(model.cacheReadsPrice).toBe(0.03)
})

it("should correctly configure MiniMax-M2.5-highspeed model properties", () => {
const model = minimaxModels["MiniMax-M2.5-highspeed"]
expect(model.maxTokens).toBe(16_384)
expect(model.contextWindow).toBe(192_000)
expect(model.supportsImages).toBe(false)
expect(model.supportsPromptCache).toBe(true)
expect(model.inputPrice).toBe(0.6)
expect(model.outputPrice).toBe(2.4)
expect(model.cacheWritesPrice).toBe(0.375)
expect(model.cacheReadsPrice).toBe(0.03)
})
})
})
Loading