Skip to content

fix(web): match current model by id in model picker dropdown - #1565

Merged
wbxl2000 merged 1 commit into
mainfrom
fix/web-model-picker-identity
Jul 12, 2026
Merged

fix(web): match current model by id in model picker dropdown#1565
wbxl2000 merged 1 commit into
mainfrom
fix/web-model-picker-identity

Conversation

@wbxl2000

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

In the web UI composer's model quick-switch dropdown, the checkmark for the current model was matched by name (m.id === status.model || m.model === status.model || m.displayName === status.model). Different providers can serve models with identical display names, so every same-named entry across providers showed a checkmark at once — misleading about which model is actually active.

What changed

Match the current model by its unique AppModel.id everywhere instead of by name:

  • Composer.vue: the dropdown checkmark condition is now m.id === status.modelId, consistent with the existing is-current row highlight; the currentModel computed that drives the thinking-level controls also resolves by id.
  • useKimiWebClient.ts: status.modelId resolution now prefers an exact id match and only falls back to a model-name match, so a bare model name in session.model still resolves to a single entry.
  • MobileSettingsSheet.vue and App.vue (nextThinkingLevel): same id-based resolution for the thinking controls.
  • useModelProviderState.ts: modelById prefers exact id match before the name fallback.

vue-tsc typecheck and the full kimi-web vitest suite (380 tests) pass.

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.

Model names and display names can collide across providers, so the
composer dropdown's checkmark matched by name and lit up every
same-named entry. Resolve the current model through its unique id
everywhere (dropdown check, thinking controls, status resolution).
@changeset-bot

changeset-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fa5c2a1

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 12, 2026

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

commit: fa5c2a1

@wbxl2000
wbxl2000 merged commit 1d3dba5 into main Jul 12, 2026
11 checks passed
@wbxl2000
wbxl2000 deleted the fix/web-model-picker-identity branch July 12, 2026 06:47
@github-actions github-actions Bot mentioned this pull request Jul 12, 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