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
19 changes: 17 additions & 2 deletions packages/types/src/providers/minimax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,24 @@ import type { ModelInfo } from "../model.js"
// https://platform.minimax.io/docs/api-reference/text-openai-api
// https://platform.minimax.io/docs/api-reference/text-anthropic-api
export type MinimaxModelId = keyof typeof minimaxModels
export const minimaxDefaultModelId: MinimaxModelId = "MiniMax-M2"
export const minimaxDefaultModelId: MinimaxModelId = "MiniMax-M2.5"

export const minimaxModels = {
"MiniMax-M2.5": {
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.5, a frontier model with 204K context window and 131K max output, offering top-tier coding and agentic performance with ultimate cost-effectiveness.",
},
"MiniMax-M2": {
maxTokens: 16_384,
contextWindow: 192_000,
Expand Down Expand Up @@ -57,5 +72,5 @@ export const minimaxModels = {

export const minimaxDefaultModelInfo: ModelInfo = minimaxModels[minimaxDefaultModelId]

export const MINIMAX_DEFAULT_MAX_TOKENS = 16_384
export const MINIMAX_DEFAULT_MAX_TOKENS = 131_072
export const MINIMAX_DEFAULT_TEMPERATURE = 1.0
6 changes: 3 additions & 3 deletions src/api/providers/__tests__/minimax.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ describe("MiniMaxHandler", () => {
it("returns default model when no model ID is specified", () => {
const handler = createHandler()
const model = handler.getModel()
expect(model.id).toBe("MiniMax-M2")
expect(model.id).toBe("MiniMax-M2.5")
expect(model.temperature).toBe(1)
})

Expand Down Expand Up @@ -234,7 +234,7 @@ describe("MiniMaxHandler", () => {
const handler = createHandler()
const chunks = await collectChunks(handler.createMessage(systemPrompt, messages))

expect(mockModel).toHaveBeenCalledWith("MiniMax-M2")
expect(mockModel).toHaveBeenCalledWith("MiniMax-M2.5")
expect(mockStreamText).toHaveBeenCalledWith(
expect.objectContaining({
model: "mock-model-instance",
Expand Down Expand Up @@ -372,7 +372,7 @@ describe("MiniMaxHandler", () => {
const result = await handler.completePrompt("test prompt")

expect(result).toBe("response")
expect(mockModel).toHaveBeenCalledWith("MiniMax-M2")
expect(mockModel).toHaveBeenCalledWith("MiniMax-M2.5")
expect(mockGenerateText).toHaveBeenCalledWith(
expect.objectContaining({
model: "mock-model-instance",
Expand Down
Loading