Skip to content

feat(moonshot): add Kimi K2 and K2.5 model constants#1457

Merged
joshua-mo-143 merged 1 commit into0xPlaygrounds:mainfrom
howardpen9:feat/moonshot-add-kimi-models
Mar 3, 2026
Merged

feat(moonshot): add Kimi K2 and K2.5 model constants#1457
joshua-mo-143 merged 1 commit into0xPlaygrounds:mainfrom
howardpen9:feat/moonshot-add-kimi-models

Conversation

@howardpen9
Copy link
Copy Markdown
Contributor

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 context

Documentation improvements

  • Update doc example to showcase Kimi K2.5 (the current flagship model)
  • Add custom base URL example (https://api.moonshot.ai/v1 for global access vs the default https://api.moonshot.cn/v1)
  • Fix doc example compilation by adding CompletionClient trait import and proper error handling

Why

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 — passes
  • cargo clippy -p rig-core -- -D warnings — passes
  • cargo test -p rig-core --lib — passes
  • cargo test -p rig-core --doc -- moonshot — passes

This PR was generated with AI assistance (Claude).

🤖 Generated with Claude Code

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>
Copy link
Copy Markdown
Contributor

@joshua-mo-143 joshua-mo-143 left a comment

Choose a reason for hiding this comment

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

lgtm, thank you!

@joshua-mo-143 joshua-mo-143 added this pull request to the merge queue Mar 3, 2026
Merged via the queue into 0xPlaygrounds:main with commit 593e5fe Mar 3, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 3, 2026
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.

2 participants