fix(web): remove deleted custom models from picker - #4654
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6f1d011. Configure here.
ApprovabilityVerdict: Approved This is a straightforward bug fix that filters out deleted custom models from the picker when server cache is stale. Changes are limited to model selection logic with clear test coverage, no runtime behavior impact beyond fixing the display bug. You can customize Macroscope's approvability policy. Learn more. |
|
Note 🤖 GPT-5.6 Sol responding on behalf of Theo Closing this because #9075 has merged. The web picker now builds custom-model membership from current settings instead of stale snapshots, and normal selection falls back to an available model. |

What Changed
Why
Provider snapshots refresh asynchronously after settings writes. The Settings page already removed a deleted custom model immediately, but the composer rebuilt its options from the stale snapshot and made that model selectable again.
User Impact
Removing a custom provider model now removes it from the composer immediately. If it was selected, the composer falls back to an available model instead of retaining the deleted selection.
Validation
vp test run apps/web/src/modelSelection.test.ts apps/web/src/components/settings/ProviderInstanceCard.test.ts(13 tests)vp fmt --check apps/web/src/modelSelection.ts apps/web/src/modelSelection.test.tsvp lint apps/web/src/modelSelection.ts apps/web/src/modelSelection.test.ts --report-unused-disable-directivesvp run --filter @t3tools/web typecheckChecklist
Note
Remove deleted custom models from the model picker
getAppModelOptionsForInstanceandgetAppModelOptionsnow exclude custom models from the provider snapshot unless the instance/user's configuredcustomModelsexplicitly includes the slug, preventing deleted models from appearing in the picker.resolveAppModelSelectionForInstancefallbacks now skip custom models entirely, returning the first non-custom default ornull.Macroscope summarized dc76b9d.
Note
Low Risk
Scoped to composer model-picker and selection resolution; no auth or persistence changes beyond aligning UI with settings as source of truth for custom models.
Overview
Fixes a race where the composer rebuilt model options from a stale provider snapshot after Settings removed a custom model, so deleted models could reappear and stay selected.
Model option lists (
getAppModelOptions/getAppModelOptionsForInstance) now take built-in models from the live snapshot but only add custom models whose slugs are still in instancecustomModelssettings. Custom entries on the snapshot alone are no longer merged into the picker. When a configured slug still exists on the snapshot, provider metadata is used; otherwise a minimal custom stub is shown.Selection fallback in
resolveAppModelSelectionForInstanceno longer picks default/first custom models fromentry.modelswhen the active choice is invalid—only non-custom defaults remain as fallbacks, ornullwhen nothing else is available.Regression tests cover stale snapshots that still list a removed custom model while settings has an empty
customModelslist.Reviewed by Cursor Bugbot for commit dc76b9d. Bugbot is set up for automated code reviews on this repo. Configure here.