mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-19 01:51:15 -05:00
fix: a model can switch off every Default Feature the admin turned on (#32500)
The model editor dropped meta.defaultFeatureIds when the list was empty. When Admin Settings > Models > Model Defaults turns a default feature on, the backend fills in that default for any model without the key, so switching the last feature off on a model saved nothing and the admin default came back on reopen and in new chats. Keep the empty list when the admin default is not empty, so the model's choice is stored and overrides it.
This commit is contained in:
1 file changed
+1
-1
@@ -450,7 +450,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (defaultFeatureIds.length > 0) {
|
||||
if (defaultFeatureIds.length > 0 || defaultMeta.defaultFeatureIds?.length > 0) {
|
||||
modelInfo.meta.defaultFeatureIds = defaultFeatureIds;
|
||||
} else {
|
||||
if (modelInfo.meta.defaultFeatureIds) {
|
||||
|
||||
Reference in new issue
Block a user