Skip to content

fix(vscode): fall back to generic "Try Model" for long model names#8561

Merged
markijbema merged 2 commits into
mainfrom
recover/pr-7981
Apr 8, 2026
Merged

fix(vscode): fall back to generic "Try Model" for long model names#8561
markijbema merged 2 commits into
mainfrom
recover/pr-7981

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Recover PR #7981 which was lost due to force-push from the publish workflow on April 1, 2026 (see #8558).

  • Falls back to generic "Try Model" when the suggested model's display name exceeds 30 characters (after stripping sub-provider prefix)
  • Adds tryModelGeneric i18n key for the fallback label across all 18 locales

Why 30 characters?

Analyzed the live Kilo Gateway model catalog (~336 models) to find a natural breakpoint in name lengths:

Length range Count % of catalog Examples
< 20 245 73% Claude Sonnet 4, GPT-5, Gemini 2.5 Pro
20-29 82 24% Claude 3.7 Sonnet (thinking), Llama 3.3 70B Instruct
30-34 4 1.2% CodeLLaMa 7B Instruct Solidity, Llama 3.1 Nemotron 70B Instruct
35-39 3 0.9% Gemini 2.5 Flash Lite Preview 09-2025, Gemini 3.1 Pro Preview Custom Tools
40+ 2 0.6% Nano Banana 2 (Gemini 3.1 Flash Image Preview) (46 chars)

97% of models fit under 30 characters. The 9 models above 30 are verbose edge cases. A 30-char name + "Try " prefix = max 34-char button label, which fits comfortably in the notification card.

Fixes #8558

Recover PR #7981 (force-pushed by publish workflow on April 1, 2026).

When the suggested model name exceeds 30 characters (after stripping
sub-provider prefix), fall back to the generic "Try Model" label
to prevent an oversized notification button.

Adds tryModelGeneric i18n key for the fallback label across all 18
locales.

See #8558
{language.t("notifications.action.tryModel", { model: suggestedName() ?? "" })}
{suggestedName()
? language.t("notifications.action.tryModel", { model: suggestedName()! })
: language.t("notifications.action.tryModelGeneric")}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

WARNING: Missing uk translation for the new generic label

language.t() returns the key name when a locale entry is missing, so Ukrainian users will see notifications.action.tryModelGeneric on this button. Add the new key to packages/kilo-vscode/webview-ui/src/i18n/uk.ts before shipping.

@kilo-code-bot

kilo-code-bot Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/kilo-vscode/webview-ui/src/i18n/uk.ts

Reviewed by gpt-5.4-2026-03-05 · 1,624,960 tokens

@markijbema markijbema enabled auto-merge April 8, 2026 08:09
@markijbema markijbema self-assigned this Apr 8, 2026
@markijbema markijbema merged commit c9e8188 into main Apr 8, 2026
14 checks passed
@markijbema markijbema deleted the recover/pr-7981 branch April 8, 2026 08:21
jliounis pushed a commit to jliounis/kilocode that referenced this pull request May 18, 2026
fix(vscode): fall back to generic "Try Model" for long model names
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.

Audit: PRs potentially reverted by publish workflow force push (April 1-7, 2026)

2 participants