diff --git a/backend/open_webui/models/config.py b/backend/open_webui/models/config.py index 5d0b2266b7..00fcfc2e00 100644 --- a/backend/open_webui/models/config.py +++ b/backend/open_webui/models/config.py @@ -248,6 +248,10 @@ class Config(Base): now = int(time.time()) new_count = 0 for key, value in defaults.items(): + # Skip keys the DB is not authoritative for (e.g. oauth.* while + # ENABLE_OAUTH_PERSISTENT_CONFIG is off), matching the read paths. + if not Config.persistent_enabled_for(key): + continue if key not in existing_keys: value = _json_value(value) db.add(Config(key=key, value=value, updated_at=now))