fix: Show Model after Hide Model is saved for a model that had no saved settings (#32368)

This commit is contained in:
G30 2026-10-14 04:38:35 -04:00 • committed by GitHub
parent 120be2f3a5
commit 46f76b359c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -485,7 +485,10 @@
model = { ...model, ...(isPresetModel(model) ? {} : { base_model_id: null }), ...overrides };
if (savedModels.find((m: ModelListItem) => m.id === model.id) || isPresetModel(model)) {
const res = await updateModelById(localStorage.token, model.id, model).catch((error) => {
const res = await updateModelById(localStorage.token, model.id, {
...savedModels.find((m: ModelListItem) => m.id === model.id),
...model
}).catch((error) => {
return null;
});