Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions packages/types/src/providers/fireworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type FireworksModelId =
| "accounts/fireworks/models/kimi-k2-instruct-0905"
| "accounts/fireworks/models/kimi-k2-thinking"
| "accounts/fireworks/models/kimi-k2p5"
| "accounts/fireworks/models/kimi-k2p6"
| "accounts/fireworks/models/minimax-m2"
| "accounts/fireworks/models/minimax-m2p1"
| "accounts/fireworks/models/qwen3-235b-a22b-instruct-2507"
Expand All @@ -13,10 +14,12 @@ export type FireworksModelId =
| "accounts/fireworks/models/deepseek-v3"
| "accounts/fireworks/models/deepseek-v3p1"
| "accounts/fireworks/models/deepseek-v3p2"
| "accounts/fireworks/models/deepseek-v4-pro"
| "accounts/fireworks/models/glm-4p5"
| "accounts/fireworks/models/glm-4p5-air"
| "accounts/fireworks/models/glm-4p6"
| "accounts/fireworks/models/glm-4p7"
| "accounts/fireworks/models/glm-5p1"
| "accounts/fireworks/models/gpt-oss-20b"
| "accounts/fireworks/models/gpt-oss-120b"
| "accounts/fireworks/models/llama-v3p3-70b-instruct"
Expand Down Expand Up @@ -240,4 +243,35 @@ export const fireworksModels = {
description:
"Llama 4 Scout is a smaller, faster variant of Llama 4 with multimodal capabilities, ideal for quick iterations and cost-effective deployments.",
},
"accounts/fireworks/models/kimi-k2p6": {
maxTokens: 16384,
contextWindow: 262144,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.6,
outputPrice: 3.0,
cacheReadsPrice: 0.1,
description:
"Kimi K2.6 is Moonshot AI's latest flagship agentic model, building on K2.5 with stronger long-horizon reasoning, multi-step tool use, and unified vision/text understanding.",
},
"accounts/fireworks/models/deepseek-v4-pro": {
maxTokens: 16384,
contextWindow: 163840,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This context window (163840 = 160K) is identical to deepseek-v3p2. Would a V4 model have a larger context window? Worth checking the Fireworks model card before merging — same question applies to the pricing on lines 262-263.

supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.56,
outputPrice: 1.68,
description:
"DeepSeek V4 Pro is the latest iteration of the DeepSeek model family, with improved reasoning, code generation, and instruction following over the V3 series.",
},
"accounts/fireworks/models/glm-5p1": {
maxTokens: 25344,
contextWindow: 198000,
supportsImages: false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could GLM-5.1 support images? The GLM-5 series from Z.ai introduced multimodal capabilities — if so, supportsImages should be true. Worth a quick check against the Fireworks model card.

supportsPromptCache: false,
inputPrice: 0.55,
outputPrice: 2.19,
description:
"Z.ai GLM-5.1 is the latest coding-focused model in the GLM family, with exceptional performance on complex programming tasks and enhanced reasoning and code generation quality.",
},
} as const satisfies Record<string, ModelInfo>
20 changes: 20 additions & 0 deletions src/api/providers/__tests__/fireworks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,26 @@ describe("FireworksHandler", () => {
expect(model.info).toEqual(expect.objectContaining(fireworksModels[testModelId]))
})

it.each([
"accounts/fireworks/models/glm-5p1",
"accounts/fireworks/models/kimi-k2p6",
"accounts/fireworks/models/deepseek-v4-pro",
] as const satisfies readonly FireworksModelId[])("should expose newly added model %s", (modelId) => {
expect(fireworksModels[modelId]).toBeDefined()
const info = fireworksModels[modelId]
expect(info.maxTokens).toBeGreaterThan(0)
expect(info.contextWindow).toBeGreaterThan(0)
expect(info.inputPrice).toBeGreaterThanOrEqual(0)
expect(info.outputPrice).toBeGreaterThanOrEqual(0)
expect(info.description).toBeTruthy()

const handlerWithModel = new FireworksHandler({
apiModelId: modelId,
fireworksApiKey: "test-fireworks-api-key",
})
expect(handlerWithModel.getModel().id).toBe(modelId)
})

it("should return Kimi K2 Instruct model with correct configuration", () => {
const testModelId: FireworksModelId = "accounts/fireworks/models/kimi-k2-instruct"
const handlerWithModel = new FireworksHandler({
Expand Down
Loading