Skip to content

feat(fireworks): add kimi-k2p7-code model - #599

Merged
edelauna merged 1 commit into
Zoo-Code-Org:mainfrom
p12tic:kimi-k2.7-code-support
Jun 20, 2026
Merged

feat(fireworks): add kimi-k2p7-code model#599
edelauna merged 1 commit into
Zoo-Code-Org:mainfrom
p12tic:kimi-k2.7-code-support

Conversation

@p12tic

@p12ticp12tic commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Related GitHub Issue

Closes: #598

Description

Add kimi-k2p7-code model introduced on Fireworks.ai recently.

Test Procedure

Used the model.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

N/A.

Documentation Updates

N/A

Additional Notes

N/A

Get in Touch

Please mention on github.

Summary by CodeRabbit

New Features

  • Added support for the new Fireworks model accounts/fireworks/models/kimi-k2p7-code, including token limits, context window, capability feature flags (images and prompt cache), reasoning/temperature controls, and pricing details with cache-read cost.

Tests

  • Added unit test coverage to verify the accounts/fireworks/models/kimi-k2p7-code model’s configuration (limits, context, feature flags, default temperature) and pricing fields (inputPrice, outputPrice, cacheReadsPrice).

@coderabbitai

coderabbitaiBot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc0dda22-bbf7-4749-93ee-4dd41cbc8fef

📥 Commits

Reviewing files that changed from the base of the PR and between f00d0e0 and 7df9550.

📒 Files selected for processing (2)
  • packages/types/src/providers/fireworks.ts
  • src/api/providers/__tests__/fireworks.spec.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/api/providers/tests/fireworks.spec.ts
  • packages/types/src/providers/fireworks.ts

📝 Walkthrough

Walkthrough

This PR adds support for the Kimi K2.7 Code model from Fireworks by extending the FireworksModelId union type, registering the model's configuration with pricing and context window details, and adding a corresponding test case to verify its properties.

Changes

Kimi K2.7 Code Model Addition

Layer / File(s)Summary
Model type and configuration registration
packages/types/src/providers/fireworks.ts
The FireworksModelId type includes "accounts/fireworks/models/kimi-k2p7-code", and the fireworksModels map defines its ModelInfo with token limits, context window, feature flags (images, prompt cache, reasoning/temperature), and pricing including cache reads.
Model validation test
src/api/providers/__tests__/fireworks.spec.ts
Test case verifies the kimi-k2p7-code model's configuration flags, context window, pricing fields (inputPrice, outputPrice, cacheReadsPrice), and model identifier.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Zoo-Code-Org/Zoo-Code#231: Both PRs extend FireworksModelId and add entries to the fireworksModels registry with corresponding test updates for newly registered Fireworks models.

Suggested reviewers

  • taltas
  • navedmerchant
  • hannesrudolph
  • JamesRobert20

Poem

🐰 A Kimi model hops into place,
With codes and context, token grace,
Type-safe and tested, shining bright,
Fireworks now burns even more light! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly and concisely summarizes the main change: adding the kimi-k2p7-code model to the Fireworks provider.
Description check✅ PassedThe description includes the required sections: linked issue (#598), implementation details, test procedure, and completed pre-submission checklist items.
Linked Issues check✅ PassedThe PR successfully adds support for the Kimi K2.7 Code model from fireworks.ai as requested in issue #598, with appropriate type definitions and test coverage.
Out of Scope Changes check✅ PassedAll changes are focused on adding the kimi-k2p7-code model: type definition, model registry entry, and corresponding unit tests. No unrelated modifications detected.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@coderabbitaicoderabbitaiBot 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.

Actionable comments posted: 1

🤖 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.
Inline comments:
In `@packages/types/src/providers/fireworks.ts`:
- Around line 269-279: Update the pricing constants for the model entry
"accounts/fireworks/models/kimi-k2p7-code": change inputPrice from 0.95 to 1.20,
change cacheReadsPrice from 0.19 to 0.60, and change outputPrice from 4.0 to
1.20 so the input/output/cache read rates match the official Fireworks rates
(values represent $ per 1M tokens).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e978d832-fe9d-4e62-8698-1c0e2cba8d84

📥 Commits

Reviewing files that changed from the base of the PR and between 6bcd398 and 8cd0e0d.

📒 Files selected for processing (2)
  • packages/types/src/providers/fireworks.ts
  • src/api/providers/__tests__/fireworks.spec.ts

Comment threadpackages/types/src/providers/fireworks.ts
@codecov

codecovBot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelaunaedelauna 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.

Thanks for adding the model, has some questions about the model params.

Comment threadpackages/types/src/providers/fireworks.ts
Comment threadsrc/api/providers/__tests__/fireworks.spec.ts Outdated
@p12tic
p12ticforce-pushed the kimi-k2.7-code-support branch from 8cd0e0d to f00d0e0CompareJune 14, 2026 15:08
@p12tic

Copy link
Copy Markdown
ContributorAuthor

@edelauna Thanks for review, I've addressed your comments.

@github-actionsgithub-actionsBot added the awaiting-author PR is waiting for the author to address requested changes label Jun 15, 2026
@p12tic
p12ticforce-pushed the kimi-k2.7-code-support branch from f00d0e0 to 7df9550CompareJune 18, 2026 11:11
@p12tic

Copy link
Copy Markdown
ContributorAuthor

@edelauna I think this PR is good to go. Previously some unrelated flaky tests were failing, I just rebased and pushed the same code again.

@edelaunaedelauna 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.

Thanks for your patience, yeah we're dealing with some flakey tests on account of upgrading to vitest 4

@edelauna
edelauna added this pull request to the merge queueJun 20, 2026
@github-actionsgithub-actionsBot removed the awaiting-author PR is waiting for the author to address requested changes label Jun 20, 2026
Merged via the queue into Zoo-Code-Org:main with commit 74583b5Jun 20, 2026
10 checks passed
@p12tic
p12tic deleted the kimi-k2.7-code-support branch June 22, 2026 09:50
Sign up for freeto 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.

Support Kimi K2.7 Code from fireworks.ai

2 participants

@p12tic@edelauna