Skip to content

Commit 193be14

Browse files
committed
feat: add Kimi K2 thinking model to Fireworks AI provider
1 parent 483e70c commit 193be14

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

packages/types/src/providers/fireworks.ts

Lines changed: 16 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/kimi-k2-thinking"
67
| "accounts/fireworks/models/minimax-m2"
78
| "accounts/fireworks/models/qwen3-235b-a22b-instruct-2507"
89
| "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct"
@@ -41,6 +42,21 @@ export const fireworksModels = {
4142
description:
4243
"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.",
4344
},
45+
"accounts/fireworks/models/kimi-k2-thinking": {
46+
maxTokens: 16000,
47+
contextWindow: 256000,
48+
supportsImages: false,
49+
supportsPromptCache: true,
50+
supportsNativeTools: true,
51+
supportsTemperature: true,
52+
preserveReasoning: true,
53+
defaultTemperature: 1.0,
54+
inputPrice: 0.6,
55+
outputPrice: 2.5,
56+
cacheReadsPrice: 0.15,
57+
description:
58+
"The kimi-k2-thinking model is a general-purpose agentic reasoning model developed by Moonshot AI. Thanks to its strength in deep reasoning and multi-turn tool use, it can solve even the hardest problems.",
59+
},
4460
"accounts/fireworks/models/minimax-m2": {
4561
maxTokens: 4096,
4662
contextWindow: 204800,

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

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

118+
it("should return Kimi K2 Thinking model with correct configuration", () => {
119+
const testModelId: FireworksModelId = "accounts/fireworks/models/kimi-k2-thinking"
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: 16000,
129+
contextWindow: 256000,
130+
supportsImages: false,
131+
supportsPromptCache: true,
132+
supportsNativeTools: true,
133+
supportsTemperature: true,
134+
preserveReasoning: true,
135+
defaultTemperature: 1.0,
136+
inputPrice: 0.6,
137+
outputPrice: 2.5,
138+
cacheReadsPrice: 0.15,
139+
}),
140+
)
141+
})
142+
118143
it("should return MiniMax M2 model with correct configuration", () => {
119144
const testModelId: FireworksModelId = "accounts/fireworks/models/minimax-m2"
120145
const handlerWithModel = new FireworksHandler({

0 commit comments

Comments
 (0)