Skip to content

fix(models): correct kimi-k3 reasoning efforts on moonshot - #3378

Merged
steebchen merged 1 commit into
theopenco:mainfrom
AmineAce:feat/reasoning-moonshot-k3-fix
Aug 3, 2026
Merged

steebchen merged 1 commit into
theopenco:mainfrom
AmineAce:feat/reasoning-moonshot-k3-fix

Conversation

@AmineAce

@AmineAce AmineAce commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Corrects an existing wrong value: moonshot/kimi-k3's reasoningEfforts was 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 moonshot mapping only.

Testing

  • pnpm format — only moonshot.ts changed, 2 lines.

Summary by CodeRabbit

  • New Features
    • Moonshot’s Kimi K3 provider now supports low, high, and max reasoning effort levels.
    • Updated guidance reflects the provider’s native reasoning effort behavior.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c19165c-6ecc-49e2-9f1f-0114b97056d1

📥 Commits

Reviewing files that changed from the base of the PR and between b6835cf and 1e1b98e.

📒 Files selected for processing (1)
  • packages/models/src/models/moonshot.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/models/src/models/moonshot.ts

Walkthrough

Moonshot Kimi K3 now advertises low, high, and max native reasoning effort levels. Its configuration comment describes the accepted top-level reasoning_effort values.

Changes

Moonshot Kimi K3 configuration

Layer / File(s) Summary
Native reasoning effort metadata
packages/models/src/models/moonshot.ts
Kimi K3 changes its supported reasoning efforts from max only to low, high, and max. The description now reflects native top-level reasoning_effort handling.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the correction to Kimi K3 reasoning effort support for Moonshot.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/models/src/models/moonshot.ts (1)

657-660: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Cover low and high in the request-shape tests.

The supplied packages/actions/src/prepare-request-body.spec.ts:1000-1007 test covers only max. Add or confirm cases for low and high that assert native reasoning_effort forwarding and thinking remains 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1b5a083 and cbc740d.

📒 Files selected for processing (1)
  • packages/models/src/models/moonshot.ts

Comment thread packages/models/src/models/moonshot.ts
@steebchen
steebchen force-pushed the feat/reasoning-moonshot-k3-fix branch from cbc740d to b6835cf Compare August 3, 2026 17:15
@steebchen
steebchen force-pushed the feat/reasoning-moonshot-k3-fix branch from b6835cf to 1e1b98e Compare August 3, 2026 18:14
@steebchen
steebchen enabled auto-merge August 3, 2026 18:14
@steebchen
steebchen added this pull request to the merge queue Aug 3, 2026
Merged via the queue into theopenco:main with commit 6a280c1 Aug 3, 2026
8 checks passed
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