Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ body:
- AWS Bedrock
- Chutes AI
- DeepSeek
- Fireworks AI
- Glama
- Google Gemini
- Google Vertex AI
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export const SECRET_STATE_KEYS = [
"codebaseIndexMistralApiKey",
"huggingFaceApiKey",
"sambaNovaApiKey",
"fireworksApiKey",
] as const satisfies readonly (keyof ProviderSettings)[]
export type SecretState = Pick<ProviderSettings, (typeof SECRET_STATE_KEYS)[number]>

Expand Down
7 changes: 7 additions & 0 deletions packages/types/src/provider-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const providerNames = [
"cerebras",
"sambanova",
"zai",
"fireworks",
] as const

export const providerNamesSchema = z.enum(providerNames)
Expand Down Expand Up @@ -263,6 +264,10 @@ const zaiSchema = apiModelIdProviderModelSchema.extend({
zaiApiLine: z.union([z.literal("china"), z.literal("international")]).optional(),
})

const fireworksSchema = apiModelIdProviderModelSchema.extend({
fireworksApiKey: z.string().optional(),
})

const defaultSchema = z.object({
apiProvider: z.undefined(),
})
Expand Down Expand Up @@ -297,6 +302,7 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv
cerebrasSchema.merge(z.object({ apiProvider: z.literal("cerebras") })),
sambaNovaSchema.merge(z.object({ apiProvider: z.literal("sambanova") })),
zaiSchema.merge(z.object({ apiProvider: z.literal("zai") })),
fireworksSchema.merge(z.object({ apiProvider: z.literal("fireworks") })),
defaultSchema,
])

Expand Down Expand Up @@ -331,6 +337,7 @@ export const providerSettingsSchema = z.object({
...cerebrasSchema.shape,
...sambaNovaSchema.shape,
...zaiSchema.shape,
...fireworksSchema.shape,
...codebaseIndexProviderSchema.shape,
})

Expand Down
61 changes: 61 additions & 0 deletions packages/types/src/providers/fireworks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import type { ModelInfo } from "../model.js"

export type FireworksModelId =
| "accounts/fireworks/models/kimi-k2-instruct"
| "accounts/fireworks/models/qwen3-235b-a22b-instruct-2507"
| "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct"
| "accounts/fireworks/models/deepseek-r1-0528"
| "accounts/fireworks/models/deepseek-v3"

export const fireworksDefaultModelId: FireworksModelId = "accounts/fireworks/models/kimi-k2-instruct"

export const fireworksModels = {
"accounts/fireworks/models/kimi-k2-instruct": {
maxTokens: 16384,
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.6,
outputPrice: 2.5,
description:
"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.",
},
"accounts/fireworks/models/qwen3-235b-a22b-instruct-2507": {
maxTokens: 32768,
contextWindow: 256000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.22,
outputPrice: 0.88,
description: "Latest Qwen3 thinking model, competitive against the best closed source models in Jul 2025.",
},
"accounts/fireworks/models/qwen3-coder-480b-a35b-instruct": {
maxTokens: 32768,
contextWindow: 256000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.45,
outputPrice: 1.8,
description: "Qwen3's most agentic code model to date.",
},
"accounts/fireworks/models/deepseek-r1-0528": {
maxTokens: 20480,
contextWindow: 160000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 3,
outputPrice: 8,
description:
"05/28 updated checkpoint of Deepseek R1. Its overall performance is now approaching that of leading models, such as O3 and Gemini 2.5 Pro. Compared to the previous version, the upgraded model shows significant improvements in handling complex reasoning tasks, and this version also offers a reduced hallucination rate, enhanced support for function calling, and better experience for vibe coding. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us.",
},
"accounts/fireworks/models/deepseek-v3": {
maxTokens: 16384,
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 0.9,
outputPrice: 0.9,
description:
"A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us.",
},
} as const satisfies Record<string, ModelInfo>
1 change: 1 addition & 0 deletions packages/types/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ export * from "./vscode-llm.js"
export * from "./xai.js"
export * from "./doubao.js"
export * from "./zai.js"
export * from "./fireworks.js"
3 changes: 3 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
SambaNovaHandler,
DoubaoHandler,
ZAiHandler,
FireworksHandler,
} from "./providers"

export interface SingleCompletionHandler {
Expand Down Expand Up @@ -127,6 +128,8 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler {
return new SambaNovaHandler(options)
case "zai":
return new ZAiHandler(options)
case "fireworks":
return new FireworksHandler(options)
default:
apiProvider satisfies "gemini-cli" | undefined
return new AnthropicHandler(options)
Expand Down
Loading
Loading