Skip to content

feat(cli): apply cloud-recommended default thinking effort - #3616

Merged
Grapedge merged 1 commit into
mainfrom
recommended_effort
Sep 7, 2026
Merged

feat(cli): apply cloud-recommended default thinking effort#3616
Grapedge merged 1 commit into
mainfrom
recommended_effort

Conversation

@Grapedge

@Grapedge Grapedge commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue; the problem is described below.

Problem

Once thinking.effort is persisted in config.toml, the local value outranks the model catalog's default effort forever. Raising the server-side default therefore never reaches users who already have an effort written locally, and there is no client-side path to move them onto the recommended level while preserving their final say.

What changed

  • On TUI startup, after the background provider-model refresh settles, the CLI fetches a recommended_effort named client config (POST /client_configs, 24h cache, any failure degrades to a skip) that maps model ids to { version, recommended_default_effort }.
  • When the default model matches an entry, runs against an official Kimi Code endpoint, declares the level in support_efforts, thinking is not explicitly disabled, and the entry's version is newer than the locally applied one, the level is materialized into [thinking].effort through the comment-preserving config write channel, and the applied version is recorded per model in <data dir>/recommended-effort-state.json. An already-equal effort only records the marker; every application emits a recommended_effort_applied telemetry event. A higher version may apply again later; levels the user sets in between are respected until then.
  • isManagedKimiCodeBaseUrl now matches both official endpoints (.com and .ai) when KIMI_CODE_BASE_URL is unset, so global-region providers join managed model auto-refresh and usage queries.
  • Removed the one-time max→high effort migration, which would otherwise rewrite a freshly applied max back to high on the next startup.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • 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.

@changeset-bot

changeset-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ea0ccfb

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 Patch

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f22ab012b3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/kimi-tui.ts
Comment thread apps/kimi-code/src/tui/kimi-tui.ts
Comment thread apps/kimi-code/src/utils/recommended-effort-config.ts
@pkg-pr-new

pkg-pr-new Bot commented Sep 7, 2026

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

commit: ea0ccfb

@Grapedge

Grapedge commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea0ccfbd7e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/agent-core-v2/src/app/config/configService.ts
@Grapedge
Grapedge merged commit 260ac3f into main Sep 7, 2026
15 checks passed
@Grapedge
Grapedge deleted the recommended_effort branch September 7, 2026 13:21
@github-actions github-actions Bot mentioned this pull request Sep 7, 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