Skip to content

feat: add Fireworks AI as a supported model provider#3369

Merged
Sayt-0 merged 1 commit into
mainfrom
feat/fireworks-provider
Jul 1, 2026
Merged

feat: add Fireworks AI as a supported model provider#3369
Sayt-0 merged 1 commit into
mainfrom
feat/fireworks-provider

Conversation

@Sayt-0

@Sayt-0 Sayt-0 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Adds first-class support for Fireworks AI as an OpenAI-compatible model provider via the alias map, following the existing groq/deepseek pattern.

Closes #3349

Definition of Done

Item Status Where
Alias entry fireworks (openai, https://api.fireworks.ai/inference/v1, FIREWORKS_API_KEY) done pkg/model/provider/aliases.go
Unit test asserts alias resolves and IsCatalogProvider("fireworks") is true done TestFireworksAlias
Provider appears in catalog via CatalogProviders() yes (has a BaseURL) aliases.go
task test and task lint pass yes (see Validation)
Example YAML config using a Fireworks AI model done examples/fireworks.yaml

Beyond the stated DoD, this also wires auto-detection, a default model, the JSON schema, and the provider docs, mirroring how DeepSeek was added.

Design decisions

Decision Rationale
Added to openModelHostProviders (system-message coalescing) Fireworks fronts open-weight models (Kimi, Qwen, GLM, Llama, gpt-oss) whose chat templates may reject more than one leading system message. Consecutive system messages are coalesced, per issue #3344. First-party APIs with a fixed lineup (mistral, xai, deepseek) are deliberately excluded.
Listed in modelsDevAbsentProviders (example test) models.dev catalogs Fireworks under the provider id fireworks-ai, not fireworks, so the example-validation lookup is skipped, the same treatment as ovhcloud.
Auto-detection priority between groq and deepseek Keeps the open-model-host ordering consistent; precedence assertions updated accordingly.
Default model accounts/fireworks/models/kimi-k2-instruct Fireworks headline open model; ids use the accounts/fireworks/models/<name> form.

Tests

Test Coverage
TestFireworksAlias Alias resolution and catalog membership.
TestFireworksProvider_EndToEndRequest Real HTTP request through the full stack against a local OpenAI-compatible server: asserts POST, Bearer FIREWORKS_API_KEY, /chat/completions route, verbatim model, stream reassembly, and that consecutive system messages are coalesced into one.
TestFireworksLiveAPI Live API call, skipped unless FIREWORKS_API_KEY is set, so the default run stays hermetic.
TestShouldMergeConsecutiveMessages_Gating Asserts coalescing is enabled for fireworks.
auto_test.go cases Detection, default model, precedence chain, integration with DefaultModels.

Validation

Gate Result
task build passes
golangci-lint run (whole repo) 0 issues
custom cops (go run ./lint .) no offenses
go test ./... touched packages pass; remaining failures are pre-existing SSRF/network tests unrelated to this change

Residual design uncertainty

The default model is accounts/fireworks/models/kimi-k2-instruct. If a different default is preferred (for example a Llama or Qwen id), it can always be changed.

@Sayt-0 Sayt-0 requested a review from a team as a code owner July 1, 2026 12:00
@aheritier aheritier added area/config For configuration parsing, YAML, environment variables area/docs Documentation changes area/models LLM model integrations and model providers area/providers For features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.) kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Jul 1, 2026
@aheritier aheritier marked this pull request as draft July 1, 2026 12:03
@aheritier aheritier added the status/needs-rebase PR has merge conflicts or is out of date with main label Jul 1, 2026
@aheritier

Copy link
Copy Markdown
Contributor

👋 This PR has merge conflicts with the base branch. Please rebase or merge the latest base branch and resolve them. I've moved it to draft and added status/needs-rebase; it'll be picked back up automatically once the conflicts are cleared.

@Sayt-0 Sayt-0 force-pushed the feat/fireworks-provider branch from e73f6ea to 58f06af Compare July 1, 2026 12:07
@Sayt-0 Sayt-0 marked this pull request as ready for review July 1, 2026 12:08
dgageot
dgageot previously approved these changes Jul 1, 2026
Add fireworks as a built-in OpenAI-compatible alias provider (base URL
https://api.fireworks.ai/inference/v1, token FIREWORKS_API_KEY), auto
detection in cloudProviders, default model
accounts/fireworks/models/kimi-k2-instruct, schema and docs updates, an
example config, and unit tests.

Fireworks fronts open-weight models (Kimi, Qwen, GLM, Llama, gpt-oss) with
strict chat templates, so it is added to openModelHostProviders to coalesce
consecutive system messages (issue #3344), unlike first-party APIs with a fixed
model lineup. models.dev catalogs Fireworks under the id fireworks-ai rather
than fireworks, so it is listed in modelsDevAbsentProviders to keep example
validation hermetic.

Adds an end-to-end test that drives a real HTTP request through the full stack
against a local OpenAI-compatible server (also asserting system-message
coalescing), plus a FIREWORKS_API_KEY-gated live API test.

Closes #3349
@Sayt-0 Sayt-0 merged commit bb772a9 into main Jul 1, 2026
11 checks passed
@Sayt-0 Sayt-0 deleted the feat/fireworks-provider branch July 1, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config For configuration parsing, YAML, environment variables area/docs Documentation changes area/models LLM model integrations and model providers area/providers For features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.) kind/feat PR adds a new feature (maps to feat:). Use on PRs only. status/needs-rebase PR has merge conflicts or is out of date with main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Fireworks AI as a supported model provider

3 participants