Skip to content

fix(vscode): show routed model name for auto-routed free sessions - #12000

Merged
chrarnoldus merged 2 commits into
mainfrom
fix/routed-free-model-name
Jul 7, 2026
Merged

fix(vscode): show routed model name for auto-routed free sessions#12000
chrarnoldus merged 2 commits into
mainfrom
fix/routed-free-model-name

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What

The model usage panel showed just free for kilo-auto/free sessions instead of the concrete routed model.

Why

The backend usage aggregation prefers the step-finish part's model.modelID (the concrete routed model, e.g. tencent/hy3:free) over the message tier id, so the webview already receives the right value. But modelUsageName in webview-ui/src/context/model-usage.ts stripped it incorrectly: its sub-provider prefix rule /^[^:]+:\s*/ used \s* (zero-or-more whitespace), so it matched the colon inside the id tencent/hy3:free, removed tencent/hy3:, and left only free.

Fix

Change \s* to \s+ so the rule only strips a genuine "Provider: " display-name prefix (always followed by whitespace), not the :free colon in a model id. This aligns the webview with the CLI's KiloRoutedModel.displayName, which already uses \s+. The id then flows through the existing provider-prefix strip and displays as hy3:free.

Added a regression test for the routed free-variant id.

@kilo-code-bot

kilo-code-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • packages/kilo-vscode/webview-ui/src/context/model-usage.ts
  • packages/kilo-vscode/tests/unit/model-usage.test.ts
  • .changeset/routed-free-model-name.md

Reviewed by claude-sonnet-5 · Input: 14 · Output: 4.7K · Cached: 274.2K

Review guidance: REVIEW.md from base branch main

@chrarnoldus
chrarnoldus merged commit 4e6616d into main Jul 7, 2026
21 checks passed
@chrarnoldus
chrarnoldus deleted the fix/routed-free-model-name branch July 7, 2026 10:46
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…-name

fix(vscode): show routed model name for auto-routed free sessions
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