feat(moonshot): add Kimi K2 and K2.5 model constants#1457
Merged
joshua-mo-143 merged 1 commit into0xPlaygrounds:mainfrom Mar 3, 2026
Merged
feat(moonshot): add Kimi K2 and K2.5 model constants#1457joshua-mo-143 merged 1 commit into0xPlaygrounds:mainfrom
joshua-mo-143 merged 1 commit into0xPlaygrounds:mainfrom
Conversation
Add model constants for Moonshot AI's latest Kimi models: - `KIMI_K2`: Kimi K2 MoE model (1T total params, 32B active) - `KIMI_K2_5`: Kimi K2.5 multimodal agentic model (256K context) Also improve module documentation: - Update doc example to use Kimi K2.5 - Add custom base URL example (api.moonshot.ai for global access) - Fix doc example compilation (add CompletionClient import) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Add model constants for Moonshot AI's latest Kimi models and improve module documentation:
KIMI_K2: Kimi K2 — Mixture-of-Experts model (1T total params, 32B active)KIMI_K2_5: Kimi K2.5 — Native multimodal agentic model with 256K contextDocumentation improvements
https://api.moonshot.ai/v1for global access vs the defaulthttps://api.moonshot.cn/v1)CompletionClienttrait import and proper error handlingWhy
The existing Moonshot provider only defines
MOONSHOT_CHAT(moonshot-v1-128k), which is a legacy model. Moonshot AI has since released the Kimi K2 and K2.5 series as their flagship models. Adding these constants makes it easier for users to use the latest models without having to look up the model name strings.References
Checks
cargo fmt— passescargo clippy -p rig-core -- -D warnings— passescargo test -p rig-core --lib— passescargo test -p rig-core --doc -- moonshot— passesThis PR was generated with AI assistance (Claude).
🤖 Generated with Claude Code