feat: add Fireworks AI as a supported model provider#3369
Merged
Conversation
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 |
e73f6ea to
58f06af
Compare
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
58f06af to
b9ce604
Compare
dgageot
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
fireworks(openai,https://api.fireworks.ai/inference/v1,FIREWORKS_API_KEY)pkg/model/provider/aliases.goIsCatalogProvider("fireworks")is trueTestFireworksAliasCatalogProviders()BaseURL)aliases.gotask testandtask lintpassexamples/fireworks.yamlBeyond 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
openModelHostProviders(system-message coalescing)modelsDevAbsentProviders(example test)fireworks-ai, notfireworks, so the example-validation lookup is skipped, the same treatment asovhcloud.groqanddeepseekaccounts/fireworks/models/kimi-k2-instructaccounts/fireworks/models/<name>form.Tests
TestFireworksAliasTestFireworksProvider_EndToEndRequestBearer FIREWORKS_API_KEY,/chat/completionsroute, verbatim model, stream reassembly, and that consecutive system messages are coalesced into one.TestFireworksLiveAPIFIREWORKS_API_KEYis set, so the default run stays hermetic.TestShouldMergeConsecutiveMessages_Gatingfireworks.auto_test.gocasesDefaultModels.Validation
task buildgolangci-lint run(whole repo)go run ./lint .)go test ./...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.