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:
G30 2026-10-15 19:22:13 -04:00 • committed by GitHub
parent e9233a9542
commit a8dd8dbf98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) {