Skip to content
Draft
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
15 changes: 15 additions & 0 deletions packages/types/src/providers/minimax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ export type MinimaxModelId = keyof typeof minimaxModels
export const minimaxDefaultModelId: MinimaxModelId = "MiniMax-M2.5"

export const minimaxModels = {
"MiniMax-M2.7": {
maxTokens: 131_072,
contextWindow: 204_800,
supportsImages: false,
supportsPromptCache: true,
includedTools: ["search_and_replace"],
excludedTools: ["apply_diff"],
preserveReasoning: true,
inputPrice: 0.3,
outputPrice: 1.2,
cacheWritesPrice: 0.375,
cacheReadsPrice: 0.03,
description:
"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.",
},
"MiniMax-M2.5": {
maxTokens: 16_384,
contextWindow: 204_800,
Expand Down
29 changes: 29 additions & 0 deletions src/api/providers/__tests__/minimax.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,23 @@ describe("MiniMaxHandler", () => {
expect(model.info).toEqual(minimaxModels[testModelId])
})

it("should return MiniMax-M2.7 model with correct configuration", () => {
const testModelId: MinimaxModelId = "MiniMax-M2.7"
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(204_800)
expect(model.info.maxTokens).toBe(131_072)
expect(model.info.supportsPromptCache).toBe(true)
expect(model.info.supportsImages).toBe(false)
expect(model.info.cacheWritesPrice).toBe(0.375)
expect(model.info.cacheReadsPrice).toBe(0.03)
})

it("should return MiniMax-M2.5 model with correct configuration", () => {
const testModelId: MinimaxModelId = "MiniMax-M2.5"
const handlerWithModel = new MiniMaxHandler({
Expand Down Expand Up @@ -396,6 +413,18 @@ describe("MiniMaxHandler", () => {
})

describe("Model Configuration", () => {
it("should correctly configure MiniMax-M2.7 model properties", () => {
const model = minimaxModels["MiniMax-M2.7"]
expect(model.maxTokens).toBe(131_072)
expect(model.contextWindow).toBe(204_800)
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 model properties", () => {
const model = minimaxModels["MiniMax-M2"]
expect(model.maxTokens).toBe(16_384)
Expand Down
Loading