diff --git a/.changeset/add-minimax-models.md b/.changeset/add-minimax-models.md new file mode 100644 index 00000000000..c12af51ca5b --- /dev/null +++ b/.changeset/add-minimax-models.md @@ -0,0 +1,5 @@ +--- +"kilo-code": minor +--- + +Add MiniMax-M2.5, MiniMax-M2.5-highspeed and MiniMax-M2.1-highspeed models diff --git a/packages/types/src/providers/minimax.ts b/packages/types/src/providers/minimax.ts index 7152946f7f1..af42f466b22 100644 --- a/packages/types/src/providers/minimax.ts +++ b/packages/types/src/providers/minimax.ts @@ -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 export const minimaxDefaultModelInfo: ModelInfo = minimaxModels[minimaxDefaultModelId] diff --git a/src/api/providers/__tests__/minimax.spec.ts b/src/api/providers/__tests__/minimax.spec.ts index 96865e689a7..11d0a48aa0f 100644 --- a/src/api/providers/__tests__/minimax.spec.ts +++ b/src/api/providers/__tests__/minimax.spec.ts @@ -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", () => { @@ -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) + }) }) })