Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 12, 2025

This PR attempts to address Issue #9201 by adding support for the Kimi K2 thinking model to the Fireworks AI provider.

Changes

  • Added accounts/fireworks/models/kimi-k2-thinking to the FireworksModelId type
  • Added model configuration for kimi-k2-thinking with appropriate parameters matching the Moonshot provider implementation
  • Added comprehensive test coverage for the new model

Testing

  • All existing tests pass
  • Added new test case specifically for the Kimi K2 thinking model
  • Verified model configuration matches expected values

Fixes #9201

Feedback and guidance are welcome!


Important

Add kimi-k2-thinking model to Fireworks AI provider with configuration and tests.

  • Behavior:
    • Add accounts/fireworks/models/kimi-k2-thinking to FireworksModelId in fireworks.ts.
    • Configure kimi-k2-thinking model in fireworksModels with parameters like maxTokens, contextWindow, supportsPromptCache, etc.
  • Testing:
    • Add test case in fireworks.spec.ts to verify kimi-k2-thinking model configuration.
    • Ensure all existing tests pass and new tests cover the new model's functionality.

This description was created by Ellipsis for 811c732. You can customize this summary. It will automatically update as commits are pushed.

@roomote roomote bot requested review from cte, jr and mrubens as code owners November 12, 2025 16:47
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 12, 2025
@dosubot dosubot bot added the enhancement New feature or request label Nov 12, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 12, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. Found 1 issue that needs attention.

  • Temperature default conflict: kimi-k2-thinking model specifies defaultTemperature 1.0 but FireworksHandler overrides with 0.5

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines +43 to +56
"accounts/fireworks/models/kimi-k2-thinking": {
maxTokens: 16000,
contextWindow: 262144,
supportsImages: false,
supportsPromptCache: true,
inputPrice: 0.6,
outputPrice: 2.5,
cacheReadsPrice: 0.15,
supportsTemperature: true,
preserveReasoning: true,
defaultTemperature: 1.0,
description:
"The kimi-k2-thinking model is a general-purpose agentic reasoning model developed by Moonshot AI. Thanks to its strength in deep reasoning and multi-turn tool use, it can solve even the hardest problems.",
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The kimi-k2-thinking model specifies defaultTemperature: 1.0 and supportsTemperature: true, but the FireworksHandler constructor sets a blanket defaultTemperature: 0.5 for all models. This means the model-specific default temperature of 1.0 will be overridden by the handler's 0.5 default, potentially affecting the model's reasoning behavior since temperature is a critical parameter for thinking models.

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 12, 2025
@mmealman
Copy link

I tried working with Kimi K2 Thinking a few days ago with Fireworks and tool calls were failing. However in testing this PR with Fireworks and Kimi K2 Thinking everything is working fine now. So either the interleave thinking issue at Fireworks was fixed or some other change in Roo also fixed the interleave tool call problems.

Looking forward to this being merged into main so the rest of my team can access it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Request to add Kimi K2 thinking to Fireworks AI provider

4 participants