Repository navigation
feat(models): add Kimi K3 Fast on Fireworks - #3329
Conversation
WalkthroughAdds a Fireworks ChangesKimi K3 Fast Provider
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/models/src/models/moonshot.ts (1)
754-769: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winDeclare
supportedParametersfor the Fireworks router.
prepareRequestBodydoes not stripresponse_format, andreasoning_effortforwarding 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, includingreasoning_effortand excludingresponse_formatuntil 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
📒 Files selected for processing (1)
packages/models/src/models/moonshot.ts
|
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. |
|
Model is already accessible via fireworks/kimi-k3 via PAYG on https://llmgateway.io, closing for now |
|
@smakosh Recommend reopening, fast router from fireworks is not accessible via PAYG nor devpass. fireworks/kimi-k3 is not the fast router. |
|
Does Fireworks serve 2 different models? |
|
Ok yeah, but has a different price, let me re-open then, thanks for flagging @kassieclaire |
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>
|
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 |
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 secondfireworksmapping on the existingkimi-k3model. 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 samefireworks/kimi-k3test-case id.This was the only duplicate
providerIdin the catalogue, so the invariant is now written intoAGENTS.mdalongside a rule against source-citation / value-restating comments inpackages/models.Verified live, not assumed
Every capability flag was probed against the router directly:
jsonOutput: truejson_objectandjson_schemareturn valid JSONreasoningEffortsnone/low/medium/high/xhigh/maxaccepted;minimal400svision: truetools: truetool_callspayloadstreaming: truereasoning_tokensThe original PR left
jsonOutputunset 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, andpnpm test:unitall 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: FP16banners. Comments explaining why a flag is limited (jsonOutput: false,supportedToolChoices,stability,deactivatedAt) are deliberately kept.