mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
feat: add MiniMax-M2.7 model to MiniMax provider
This commit is contained in:
parent
44fd975b17
commit
9d7ccc1216
2 changed files with 43 additions and 0 deletions
|
|
@ -8,6 +8,21 @@ export type MinimaxModelId = keyof typeof minimaxModels
|
|||
export const minimaxDefaultModelId: MinimaxModelId = "MiniMax-M2.5"
|
||||
|
||||
export const minimaxModels = {
|
||||
"MiniMax-M2.7": {
|
||||
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.06,
|
||||
description:
|
||||
"MiniMax M2.7, the newest MiniMax model with 204,800 token context window, enhanced coding and agentic capabilities.",
|
||||
},
|
||||
"MiniMax-M2.5": {
|
||||
maxTokens: 16_384,
|
||||
contextWindow: 204_800,
|
||||
|
|
|
|||
|
|
@ -87,6 +87,22 @@ 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(16_384)
|
||||
expect(model.info.supportsPromptCache).toBe(true)
|
||||
expect(model.info.cacheWritesPrice).toBe(0.375)
|
||||
expect(model.info.cacheReadsPrice).toBe(0.06)
|
||||
})
|
||||
|
||||
it("should return MiniMax-M2.5 model with correct configuration", () => {
|
||||
const testModelId: MinimaxModelId = "MiniMax-M2.5"
|
||||
const handlerWithModel = new MiniMaxHandler({
|
||||
|
|
@ -396,6 +412,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(16_384)
|
||||
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.06)
|
||||
})
|
||||
|
||||
it("should correctly configure MiniMax-M2 model properties", () => {
|
||||
const model = minimaxModels["MiniMax-M2"]
|
||||
expect(model.maxTokens).toBe(16_384)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue