mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-09 03:17:58 +00:00
feat: add MiniMax M2.5 model (#11458)
* feat: add MiniMax M2.5 model and set as default * fix: update MiniMax M2.5 contextWindow to 204_800 * Delete .changeset/add-minimax-m25.md --------- Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
This commit is contained in:
parent
2df6e38998
commit
62a7bd7354
2 changed files with 34 additions and 3 deletions
|
|
@ -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: 16_384,
|
||||
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, the latest MiniMax model with enhanced coding and agentic capabilities, building on the strengths of the M2 series.",
|
||||
},
|
||||
"MiniMax-M2": {
|
||||
maxTokens: 16_384,
|
||||
contextWindow: 192_000,
|
||||
|
|
|
|||
|
|
@ -87,6 +87,22 @@ describe("MiniMaxHandler", () => {
|
|||
expect(model.info).toEqual(minimaxModels[testModelId])
|
||||
})
|
||||
|
||||
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(204_800)
|
||||
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)
|
||||
})
|
||||
|
||||
it("should return MiniMax-M2 model with correct configuration", () => {
|
||||
const testModelId: MinimaxModelId = "MiniMax-M2"
|
||||
const handlerWithModel = new MiniMaxHandler({
|
||||
|
|
@ -175,10 +191,10 @@ describe("MiniMaxHandler", () => {
|
|||
expect(model.info).toEqual(minimaxModels[minimaxDefaultModelId])
|
||||
})
|
||||
|
||||
it("should default to MiniMax-M2 model", () => {
|
||||
it("should default to MiniMax-M2.5 model", () => {
|
||||
const handlerDefault = new MiniMaxHandler({ minimaxApiKey: "test-minimax-api-key" })
|
||||
const model = handlerDefault.getModel()
|
||||
expect(model.id).toBe("MiniMax-M2")
|
||||
expect(model.id).toBe("MiniMax-M2.5")
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue