Skip to content

feat(web): add a cache invalidation note to the model switcher#1940

Merged
wbxl2000 merged 2 commits into
mainfrom
feat/web-model-switcher-cache-note
Jul 20, 2026
Merged

feat(web): add a cache invalidation note to the model switcher#1940
wbxl2000 merged 2 commits into
mainfrom
feat/web-model-switcher-cache-note

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

The web model switcher lets users change the model or thinking effort mid-session, but nothing indicates that doing so invalidates the existing prompt cache, which can quietly increase token costs.

What changed

  • Added a small muted note in the model dropdown, in its own divider-separated section under the thinking-effort control: "Note: Switching models or thinking effort invalidates the existing prompt cache. Start a new chat to avoid extra token costs." (Chinese translation included.)
  • The note uses width: 0 + min-width: 100% so it fills the dropdown width and wraps there naturally without stretching the shrink-to-fit dropdown.

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. (Static i18n text line; no behavioral logic to test.)
  • 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 Jul 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: df764c0

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 20, 2026

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

commit: df764c0

@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: c0f8c38728

ℹ️ 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".

</div>

<div class="md-divider" />
<div class="md-cache-note">{{ t('status.cacheNote') }}</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add cache warning to the mobile switcher path

This note only renders inside the composer dropdown. On mobile, the settings sheet bypasses that dropdown (MobileSettingsSheet.vue:131-133) and opens ModelPicker, whose rows emit select directly (ModelPicker.vue:123-124, 187), while the same sheet changes thinking via setThinkingSegment() (MobileSettingsSheet.vue:121-123), so mobile users can still make both switches that this text warns about without seeing the warning. Please surface status.cacheNote in that path too.

Useful? React with 👍 / 👎.

@wbxl2000

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: df764c03d5

ℹ️ 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".

@wbxl2000
wbxl2000 merged commit d71bf9e into main Jul 20, 2026
14 checks passed
@wbxl2000
wbxl2000 deleted the feat/web-model-switcher-cache-note branch July 20, 2026 05:43
@github-actions github-actions Bot mentioned this pull request Jul 20, 2026
7723qqq added a commit to 7723qqq/kimi-code that referenced this pull request Jul 20, 2026
Upstream changes:
- feat(cli): replace kimi server command tree with kimi web (MoonshotAI#1826)
  - Removed daemon/server lifecycle (svc/ layer for launchd/systemd/schtasks)
  - Multi-server instance registry replaces single-writer lock
  - /web TUI command uses server picker instead of daemon logic
- feat(minidb): switch agent-core-v2 query-store to ClusterDb with 16 shards (MoonshotAI#1907)
  - Multiple kimi processes can share the read model concurrently
- feat: scope thinking effort to current session (MoonshotAI#1933)
- feat: add thinking_effort to turn telemetry events (MoonshotAI#1916)
- fix(agent-core-v2): host fs stat follows symlinks, add explicit lstat (MoonshotAI#1843)
- feat(web): add cache invalidation note to model switcher (MoonshotAI#1940)
- ci: release packages (MoonshotAI#1868)

Conflicts resolved:
- 9 modify/delete conflicts: accepted upstream deletion (server/*, svc/*)
- 6 content conflicts: merged while preserving fork's i18n t() calls
  and fork-specific test suites (config edge cases)
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