Skip to content

feat(agent-core): enable Preserved Thinking by default for kimi models - #1417

Merged
RealKai42 merged 1 commit into
mainfrom
kaiyi/valletta-v1
Jul 6, 2026
Merged

feat(agent-core): enable Preserved Thinking by default for kimi models#1417
RealKai42 merged 1 commit into
mainfrom
kaiyi/valletta-v1

Conversation

@RealKai42

Copy link
Copy Markdown
Collaborator

Related Issue

No tracking issue — implements a direct maintainer/user request to default Preserved Thinking on.

Problem

For Kimi thinking models, prior turns' reasoning_content was not preserved across turns unless the user manually exported KIMI_MODEL_THINKING_KEEP=all. Multi-turn reasoning therefore lost continuity by default.

What changed

  • Default thinking.keep to "all" while Thinking is on, so previous turns' reasoning is preserved across turns (Preserved Thinking).
  • Add a [thinking] keep field to config.toml (string, default "all"); an off-value (false/0/no/off/none/null) disables it.
  • Keep KIMI_MODEL_THINKING_KEEP as an override with precedence env > config > default. Applies to the kimi provider only, and only while Thinking is on.

Tests and bilingual docs (config-files.md, env-vars.md) are updated, and a changeset is included.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Default `thinking.keep` to "all" when Thinking is on so prior `reasoning_content` is kept across turns. Add `[thinking] keep` to config.toml and keep `KIMI_MODEL_THINKING_KEEP` as an override (env > config > default); off-values disable it.
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4d34cea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@4d34cea
npx https://pkg.pr.new/@moonshot-ai/kimi-code@4d34cea

commit: 4d34cea

@RealKai42
RealKai42 merged commit 79b360c into main Jul 6, 2026
11 checks passed
@RealKai42
RealKai42 deleted the kaiyi/valletta-v1 branch July 6, 2026 07:27
This was referenced Jul 6, 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.

1 participant