Skip to content

Commit 09c85c3

Browse files
committed
feat: add MiniMax M2 model to Fireworks.ai provider
- Added accounts/fireworks/models/minimax-m2 to FireworksModelId type - Added MiniMax M2 configuration with 204.8K context, 4K max output - Added pricing: $0.30 input, $1.20 output per million tokens - Added comprehensive test coverage for the new model Fixes #8961
1 parent eb68c65 commit 09c85c3

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"
@@ -37,6 +38,16 @@ export const fireworksModels = {
3738
description:
3839
"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.",
3940
},
41+
"accounts/fireworks/models/minimax-m2": {
42+
maxTokens: 4096,
43+
contextWindow: 204800,
44+
supportsImages: false,
45+
supportsPromptCache: false,
46+
inputPrice: 0.3,
47+
outputPrice: 1.2,
48+
description:
49+
"MiniMax M2 is a high-performance language model with 204.8K context window, optimized for long-context understanding and generation tasks.",
50+
},
4051
"accounts/fireworks/models/qwen3-235b-a22b-instruct-2507": {
4152
maxTokens: 32768,
4253
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)