Skip to content

fix(desktop): handle custom model ids with multiple colons#2387

Open
dwoodwardgb wants to merge 1 commit intopingdotgg:mainfrom
dwoodwardgb:t3code/handle-multi-colon-custom-model-ids
Open

fix(desktop): handle custom model ids with multiple colons#2387
dwoodwardgb wants to merge 1 commit intopingdotgg:mainfrom
dwoodwardgb:t3code/handle-multi-colon-custom-model-ids

Conversation

@dwoodwardgb
Copy link
Copy Markdown

@dwoodwardgb dwoodwardgb commented Apr 28, 2026

What Changed

Only split custom model name on first colon, not subsequent ones.

Why

Some AWS bedrock model arns have multiple : characters (i.e. us.anthropic.claude-haiku-4-5-20251001-v1:0), which causes the split to throw away the third part which causes the model to be unselectable in the UI.

UI Changes

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Low risk UI bugfix that only changes how provider:model keys are parsed during model selection; behavior should be identical for normal slugs but could misbehave if a model key ever lacks a colon.

Overview
Fixes model selection in the chat model picker for providers whose model IDs contain additional : characters (e.g. Bedrock ARN-style IDs).

Introduces parseModelKey() that splits the composite provider:modelSlug key on the first colon only, and uses it for keyboard jump selection, combobox value changes, and Enter-to-select on the highlighted item.

Reviewed by Cursor Bugbot for commit 4e892a2. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix model selection in ModelPickerContent to handle model IDs containing colons

Model slugs that contain colons (e.g. custom model IDs) were being split incorrectly, causing the provider and slug to be parsed wrong. A new parseModelKey helper splits only on the first colon, preserving the rest of the slug intact. This fix applies to all three selection paths: jump selection, combobox selection, and enter-to-select from search.

Macroscope summarized 4e892a2.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 59c1458d-8c47-4b67-8b19-cef50fb00d80

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Apr 28, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 28, 2026

Approvability

Verdict: Approved

Straightforward bug fix that corrects parsing of model IDs containing multiple colons (e.g., AWS Bedrock ARNs) by splitting only on the first colon. Limited scope, clear intent, and low risk.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant