When ENABLE_PERSISTENT_CONFIG=false, DEFAULT_MODEL_METADATA was not being read from the environment variable because it used a hardcoded empty dict as the default value.
Changes
Added proper environment variable parsing (same pattern as DEFAULT_MODEL_PARAMS) to read DEFAULT_MODEL_METADATA from environment variable.
Testing
✅ I have personally tested ALL changes in this PR
Test steps:
Set DEFAULT_MODEL_METADATA env var with JSON value
Set ENABLE_PERSISTENT_CONFIG=false
Start Open WebUI
Verify the metadata is loaded from env var
CLA
I have read and agree to the Contributor License Agreement.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/24333
**Author:** [@simer11-jing](https://github.com/simer11-jing)
**Created:** 5/3/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix/DEFAULT_MODEL_METADATA-env-parsing`
---
### 📝 Commits (1)
- [`de36446`](https://github.com/open-webui/open-webui/commit/de36446e73815c432c2204b648b8280d23be50be) fix: parse DEFAULT_MODEL_METADATA from environment variable
### 📊 Changes
**1 file changed** (+7 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/config.py` (+7 -1)
</details>
### 📄 Description
## Summary
Fixes #24319
When `ENABLE_PERSISTENT_CONFIG=false`, `DEFAULT_MODEL_METADATA` was not being read from the environment variable because it used a hardcoded empty dict as the default value.
## Changes
Added proper environment variable parsing (same pattern as `DEFAULT_MODEL_PARAMS`) to read `DEFAULT_MODEL_METADATA` from environment variable.
## Testing
✅ I have personally tested ALL changes in this PR
Test steps:
1. Set `DEFAULT_MODEL_METADATA` env var with JSON value
2. Set `ENABLE_PERSISTENT_CONFIG=false`
3. Start Open WebUI
4. Verify the metadata is loaded from env var
## CLA
I have read and agree to the Contributor License Agreement.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24333
Author: @simer11-jing
Created: 5/3/2026
Status: ❌ Closed
Base:
main← Head:fix/DEFAULT_MODEL_METADATA-env-parsing📝 Commits (1)
de36446fix: parse DEFAULT_MODEL_METADATA from environment variable📊 Changes
1 file changed (+7 additions, -1 deletions)
View changed files
📝
backend/open_webui/config.py(+7 -1)📄 Description
Summary
Fixes #24319
When
ENABLE_PERSISTENT_CONFIG=false,DEFAULT_MODEL_METADATAwas not being read from the environment variable because it used a hardcoded empty dict as the default value.Changes
Added proper environment variable parsing (same pattern as
DEFAULT_MODEL_PARAMS) to readDEFAULT_MODEL_METADATAfrom environment variable.Testing
✅ I have personally tested ALL changes in this PR
Test steps:
DEFAULT_MODEL_METADATAenv var with JSON valueENABLE_PERSISTENT_CONFIG=falseCLA
I have read and agree to the Contributor License Agreement.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.