fix(desktop): filter out stale custom models in settings panel#2385
fix(desktop): filter out stale custom models in settings panel#2385dwoodwardgb wants to merge 1 commit intopingdotgg:mainfrom
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 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 |
ApprovabilityVerdict: Approved S im ple UI fix that filters stale custom models from the settings panel display. The change is isolated to display logic with no backend or data impact. You can customize Macroscope's approvability policy. Learn more. |
What Changed
When rendering the SettingsPanel, filter out custom models in the
liveProviderthat have been deleted fromproviderConfig.Why
When a custom model is deleted from a live provider, the list is stale (not 100% sure why, it might have to do with the delete not being part of an optimistic update). In any case,
providerConfigis always up to date so using it as the source of truth for custom model list state fixes the issue.Before
t3codebefore.mov
After
t3codeafter.mov
UI Changes
Checklist
Note
Low Risk
Low risk UI-only change that filters provider model lists to avoid displaying stale custom entries; no persistence, auth, or backend behavior is modified.
Overview
Prevents deleted custom models from lingering in the Providers settings UI by filtering
liveProvider.modelsto only include custom entries still present inproviderConfig.customModels.If no live models are available, the panel still falls back to building the model list from
providerConfig.customModelsas before.Reviewed by Cursor Bugbot for commit 55b8617. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Filter stale custom models from provider cards in
GeneralSettingsPanelWhen building
providerCards, custom models fromliveProvider.modelsare now filtered to only include models whose slug exists inproviderConfig.customModels, preventing stale entries from appearing in the settings panel. The fallback that builds models directly fromproviderConfig.customModelsis unchanged.Macroscope summarized 55b8617.