fix(coding-agent): /model shows stale scoped models (#2408)

After updating models.json, the scoped model selector still shows the
old values when opened. Switching to the "all" scope, however, shows
updated model definitions.
This commit is contained in:
Sviatoslav Abakumov
2026-03-20 02:40:07 +04:00
committed by GitHub
parent fe535333fe
commit 970774ec3c

View File

@@ -164,6 +164,10 @@ export class ModelSelectorComponent extends Container implements Focusable {
}
this.allModels = this.sortModels(models);
this.scopedModels = this.scopedModels.map((scoped) => {
const refreshed = this.modelRegistry.find(scoped.model.provider, scoped.model.id);
return refreshed ? { ...scoped, model: refreshed } : scoped;
});
this.scopedModelItems = this.sortModels(
this.scopedModels.map((scoped) => ({
provider: scoped.model.provider,