Skip to content

Commit d863010

Browse files
feat: add MiniMax M2 model to Fireworks.ai provider (#8962)
Co-authored-by: Roo Code <[email protected]>
1 parent 8dc8452 commit d863010

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

packages/types/src/providers/fireworks.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { ModelInfo } from "../model.js"
33
export type FireworksModelId =
44
| "accounts/fireworks/models/kimi-k2-instruct"
55
| "accounts/fireworks/models/kimi-k2-instruct-0905"
6+
| "accounts/fireworks/models/minimax-m2"
67
| "accounts/fireworks/models/qwen3-235b-a22b-instruct-2507"
78
| "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct"
89
| "accounts/fireworks/models/deepseek-r1-0528"
@@ -38,6 +39,16 @@ export const fireworksModels = {
3839
description:
3940
"Kimi K2 is a state-of-the-art mixture-of-experts (MoE) language model with 32 billion activated parameters and 1 trillion total parameters. Trained with the Muon optimizer, Kimi K2 achieves exceptional performance across frontier knowledge, reasoning, and coding tasks while being meticulously optimized for agentic capabilities.",
4041
},
42+
"accounts/fireworks/models/minimax-m2": {
43+
maxTokens: 4096,
44+
contextWindow: 204800,
45+
supportsImages: false,
46+
supportsPromptCache: false,
47+
inputPrice: 0.3,
48+
outputPrice: 1.2,
49+
description:
50+
"MiniMax M2 is a high-performance language model with 204.8K context window, optimized for long-context understanding and generation tasks.",
51+
},
4152
"accounts/fireworks/models/qwen3-235b-a22b-instruct-2507": {
4253
maxTokens: 32768,
4354
contextWindow: 256000,

src/api/providers/__tests__/fireworks.spec.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,27 @@ describe("FireworksHandler", () => {
115115
)
116116
})
117117

118+
it("should return MiniMax M2 model with correct configuration", () => {
119+
const testModelId: FireworksModelId = "accounts/fireworks/models/minimax-m2"
120+
const handlerWithModel = new FireworksHandler({
121+
apiModelId: testModelId,
122+
fireworksApiKey: "test-fireworks-api-key",
123+
})
124+
const model = handlerWithModel.getModel()
125+
expect(model.id).toBe(testModelId)
126+
expect(model.info).toEqual(
127+
expect.objectContaining({
128+
maxTokens: 4096,
129+
contextWindow: 204800,
130+
supportsImages: false,
131+
supportsPromptCache: false,
132+
inputPrice: 0.3,
133+
outputPrice: 1.2,
134+
description: expect.stringContaining("MiniMax M2 is a high-performance language model"),
135+
}),
136+
)
137+
})
138+
118139
it("should return Qwen3 235B model with correct configuration", () => {
119140
const testModelId: FireworksModelId = "accounts/fireworks/models/qwen3-235b-a22b-instruct-2507"
120141
const handlerWithModel = new FireworksHandler({

0 commit comments

Comments
 (0)