Skip to content

feat(models): add Kimi K3 Fast on Fireworks - #3329

Merged
steebchen merged 2 commits into
theopenco:mainfrom
AmineAce:feat/model-kimi-k3-fast-fireworks
Jul 31, 2026
Merged

steebchen merged 2 commits into
theopenco:mainfrom
AmineAce:feat/model-kimi-k3-fast-fireworks

Conversation

@AmineAce

@AmineAce AmineAce commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds Fireworks' Kimi K3 "Fast" router to the catalogue, per #3328.

It is registered as its own root model (kimi-k3-fast) rather than as a second fireworks mapping on the existing kimi-k3 model. That distinction matters: mapping lookup keys on (providerId, region) everywhere in the gateway — selectProviderMapping, costs.ts, prepare-request-body.ts, getProviderMappingForModel — so a second same-provider mapping is unaddressable. It resolves back to the first mapping, which means a request actually served by the Fast router would have been validated and billed at the base mapping's cheaper prices ($3.00/$15.00 instead of $4.50/$22.50). It would also have been invisible to e2e, since both mappings generate the same fireworks/kimi-k3 test-case id.

This was the only duplicate providerId in the catalogue, so the invariant is now written into AGENTS.md alongside a rule against source-citation / value-restating comments in packages/models.

Verified live, not assumed

Every capability flag was probed against the router directly:

Field Result
jsonOutput: true both json_object and json_schema return valid JSON
reasoningEfforts none/low/medium/high/xhigh/max accepted; minimal 400s
vision: true image input described correctly
tools: true returns a well-formed tool_calls payload
streaming: true streams, reports reasoning_tokens
prices $4.50 / $0.45 / $22.50 per Mtok, per Fireworks' pricing page

The original PR left jsonOutput unset pending verification — it is supported, and leaving it unset would have silently excluded the model from JSON routing.

Testing

TEST_MODELS="fireworks/kimi-k3-fast" FULL_MODE=true pnpm test:e2e → 28 files, 106 tests passed. A verbose run confirms the mapping is genuinely exercised: basic, streaming, reasoning, reasoning + streaming, reasoning + tool calls, all six effort tiers, JSON output (+ streaming), tool calls (+ streaming), and four Responses-API cases.

pnpm format, pnpm build, and pnpm test:unit all pass.

Also in this PR

Removes 33 useless comments across 10 catalogue files — source citations (// Ref: https://groqstatus.com, an AiTimeline URL, a pricing-page citation), verbatim restatements (webSearchPrice: "0.01", // $0.01 per search), and bare // Cerebras: FP16 banners. Comments explaining why a flag is limited (jsonOutput: false, supportedToolChoices, stability, deactivatedAt) are deliberately kept.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds a Fireworks kimi-k3-fast router configuration to moonshotModels, including router-specific pricing and existing Kimi K3 capabilities while omitting unverified JSON output support.

Changes

Kimi K3 Fast Provider

Layer / File(s) Summary
Add Fireworks fast-router configuration
packages/models/src/models/moonshot.ts
Adds the accounts/fireworks/routers/kimi-k3-fast provider with pricing, streaming, reasoning, vision, tools, and reasoning effort support; jsonOutput is omitted.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: smakosh

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the addition of Kimi K3 Fast on the Fireworks provider.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
packages/models/src/models/moonshot.ts (1)

754-769: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Declare supportedParameters for the Fireworks router.

prepareRequestBody does not strip response_format, and reasoning_effort forwarding is guarded by this field; omitting the allowlist makes this mapping inconsistent with its declared capabilities unless supportedParameters is intentionally absent to keep everything allowed. Add an explicit list matching the router’s verified capabilities, including reasoning_effort and excluding response_format until support is confirmed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/models/src/models/moonshot.ts` around lines 754 - 769, Add an
explicit supportedParameters allowlist to the Fireworks Kimi K3 Fast router
model entry, including reasoning_effort and the other verified capabilities
while excluding response_format until confirmed. Keep the existing jsonOutput
omission and align the list with the behavior expected by prepareRequestBody.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/models/src/models/moonshot.ts`:
- Around line 754-769: Add an explicit supportedParameters allowlist to the
Fireworks Kimi K3 Fast router model entry, including reasoning_effort and the
other verified capabilities while excluding response_format until confirmed.
Keep the existing jsonOutput omission and align the list with the behavior
expected by prepareRequestBody.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c9e894d1-f324-4428-a88b-d13bdadabcdb

📥 Commits

Reviewing files that changed from the base of the PR and between f9848be and 9055616.

📒 Files selected for processing (1)
  • packages/models/src/models/moonshot.ts

@kassieclaire

Copy link
Copy Markdown

Does it make sense to include this model just as a separate provider for kimi-k3? The pricing is significantly different enough that it would never be used for any routing other than throughput, thus making it inaccessible through devpass, which would benefit most from access to the model.

@steebchen steebchen linked an issue Jul 31, 2026 that may be closed by this pull request
@smakosh

smakosh commented Jul 31, 2026

Copy link
Copy Markdown
Member

Model is already accessible via fireworks/kimi-k3 via PAYG on https://llmgateway.io, closing for now

@smakosh smakosh closed this Jul 31, 2026
@kassieclaire

kassieclaire commented Jul 31, 2026 •

Copy link
Copy Markdown

@smakosh Recommend reopening, fast router from fireworks is not accessible via PAYG nor devpass. fireworks/kimi-k3 is not the fast router.

@smakosh

smakosh commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

Does Fireworks serve 2 different models?

@smakosh

smakosh commented Jul 31, 2026

Copy link
Copy Markdown
Member

Ok yeah, but has a different price, let me re-open then, thanks for flagging @kassieclaire

@smakosh smakosh reopened this Jul 31, 2026
The Fireworks Fast router was added as a second `fireworks` provider
mapping on `kimi-k3`. Mapping lookup keys on (providerId, region)
throughout the gateway — selectProviderMapping, costs.ts,
prepare-request-body.ts — so the second same-provider mapping was
unaddressable and silently resolved back to the first, meaning requests
served by the Fast router would have been validated and billed at the
base mapping's cheaper prices. It was also invisible to e2e, since both
mappings generate the same `fireworks/kimi-k3` test case.

Promote it to its own `kimi-k3-fast` model and set jsonOutput: true,
verified live along with vision, tools, streaming and the reasoning
effort tiers.

Also drop source-citation and value-restating comments across the
catalogue and write both rules into AGENTS.md.

Co-Authored-By: Claude <noreply@anthropic.com>
@steebchen
steebchen enabled auto-merge July 31, 2026 19:04
@steebchen steebchen changed the title feat(models): add fireworks kimi-k3-fast provider mapping feat(models): add Kimi K3 Fast on Fireworks Jul 31, 2026
@kassieclaire

kassieclaire commented Jul 31, 2026 •

Copy link
Copy Markdown

yes, probably best to serve it as a different model to avoid issues with one provider -> multiple versions of the same model

Also, it is the only K3 variant that has a higher price, so it's different enough that setting it to a specific model identifier makes sense. I figure we could add other turbo/fast variants under the model ID if other providers have them.

To note: moonshotai has also historically released high-speed variants of their kimi models, see kimi-k2.7-code-highspeed available through their api. It might be best to group "high-speed" variants under its own model ID

@steebchen
steebchen added this pull request to the merge queue Jul 31, 2026
Merged via the queue into theopenco:main with commit 1d49bbb Jul 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Model]: fireworks/kimi-k3-fast

4 participants