← Back to PRs

#9024: Fix/Moonshot Provider Issue with kimi-k2-thinking Model Role Mapping #9018

by fotorpics open 2026-02-04 19:30 View on GitHub →
cli scripts docker agents stale
Changes: - Added kimi-k2-thinking and kimi-k2-thinking-turbo models to the Moonshot provider configuration - Set reasoning: true for these models to properly handle role mapping - This fixes the role mapping issue that prevented thinking models from working with the provider Issue fixed: #9018 <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> Adds Moonshot thinking model support by registering `kimi-k2-thinking` and `kimi-k2-thinking-turbo` in the Moonshot provider config and marking them as `reasoning: true`, addressing the role-mapping failure for thinking models. However, the Moonshot provider registry is now inconsistent with the repository’s Moonshot docs/UI model list: `kimi-k2-0905-preview` and `kimi-k2-turbo-preview` are documented/listed but not registered in `buildMoonshotProvider()`, so selecting those models will fail at runtime until they’re added to the provider config. <h3>Confidence Score: 3/5</h3> - This PR is close to mergeable, but model registration is inconsistent with docs/UI and will break documented model selection. - The change to add reasoning-enabled Moonshot thinking models is straightforward, but the provider registry omits two models that are referenced elsewhere in the repo (docs/UI). That mismatch will cause runtime model resolution failures for users following the documented configuration. - src/agents/models-config.providers.ts <!-- greptile_other_comments_section --> <sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs