Repository navigation
fix(models): correct kimi-k3 reasoning efforts on moonshot - #3378
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughMoonshot Kimi K3 now advertises ChangesMoonshot Kimi K3 configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/models/src/models/moonshot.ts (1)
657-660: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover
lowandhighin the request-shape tests.The supplied
packages/actions/src/prepare-request-body.spec.ts:1000-1007test covers onlymax. Add or confirm cases forlowandhighthat assert nativereasoning_effortforwarding andthinkingremains undefined.Based on the supplied downstream test context.
🤖 Prompt for 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. In `@packages/models/src/models/moonshot.ts` around lines 657 - 660, Extend the request-shape tests in prepare-request-body.spec.ts for the K3 reasoningEfforts configuration to cover both “low” and “high” alongside “max”. Assert each value is forwarded through the native reasoning_effort field and that the legacy thinking field remains undefined.
🤖 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/models/src/models/moonshot.ts`:
- Around line 657-660: Update the Kimi K3 comment in prepare-request-body.ts to
state that native reasoning_effort accepts “low”, “high”, and “max”, while
preserving the accurate default of “max”. Do not change the request-building
behavior, since non-disable efforts are already forwarded unchanged.
---
Nitpick comments:
In `@packages/models/src/models/moonshot.ts`:
- Around line 657-660: Extend the request-shape tests in
prepare-request-body.spec.ts for the K3 reasoningEfforts configuration to cover
both “low” and “high” alongside “max”. Assert each value is forwarded through
the native reasoning_effort field and that the legacy thinking field remains
undefined.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5d1787d8-adde-4480-b5d2-f8b0bd8a6de6
📒 Files selected for processing (1)
packages/models/src/models/moonshot.ts
cbc740d to
b6835cf
Compare
b6835cf to
1e1b98e
Compare
Summary
Corrects an existing wrong value:
moonshot/kimi-k3'sreasoningEffortswas declared as["max"]only. Moonshot's own docs confirm three values are supported.Fix
["max"]→["low", "high", "max"](default: max)Sources (3 independent, all Moonshot-owned):
Also updated a stale in-code comment that said the field "currently accepts only max."
Note for reviewers
kimi-k3 mappings on other providers (Fireworks, Canopywave) declare different enums for the same underlying model — flagging for awareness, not touched in this PR since this fix is scoped to the native
moonshotmapping only.Testing
pnpm format— onlymoonshot.tschanged, 2 lines.Summary by CodeRabbit
low,high, andmaxreasoning effort levels.