Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests to validate the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
⚙️ Valves modal behavior was improved to properly handle default values and array types, ensuring consistent distinction between custom and default valve states.
Description
This PR improves the default valves behavior in the Open WebUI interface. The changes address several issues with how valve values are handled, particularly around default values and array types.
Key improvements:
Backend changes: Modified the API endpoints to use model_dump(exclude_unset=True) to only persist explicitly provided values, preventing unnecessary expansion of default values
Frontend changes: Enhanced the Valves component to properly distinguish between custom values and default values, with improved handling of array types
UI improvements: Better visual indication of when values are using defaults vs custom values
Data integrity: More robust conversion between string and array formats for array-type valves
The changes ensure that when users interact with the valves modal, the system correctly maintains the distinction between default values (which should not be persisted) and custom values (which should be saved), leading to cleaner data storage and more predictable behavior.
Fixed
Fixed valves modal not properly handling default values for array types
Fixed backend API persisting default values when they should remain unset
Fixed array valve conversion losing empty values during string/array conversion
Fixed inconsistent behavior between "Default" and "Custom" valve states
Additional Information
This change improves the user experience by making the valves system more intuitive and reliable. The videos demonstrate the improved behavior where the modal now correctly shows "Default" vs "Custom" states and properly handles the transition between them.
The changes are backward compatible and don't affect existing functionality but provide a more robust foundation for valve management.
Screenshots or Videos
Valves modal behavior before change:
Valves modal behavior after change:
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 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/17663
**Author:** [@jmleksan](https://github.com/jmleksan)
**Created:** 9/22/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `enh-improved-default-valves-behavior`
---
### 📝 Commits (10+)
- [`fd58c59`](https://github.com/open-webui/open-webui/commit/fd58c59e0633661c0937146dc8230fc993a5dc1b) refac
- [`1e19c09`](https://github.com/open-webui/open-webui/commit/1e19c09fa37bf9bae114414fc132ccc4511df72c) refac
- [`ffacd78`](https://github.com/open-webui/open-webui/commit/ffacd787969f7d2793385b0f63b2d25ef9316f39) feat: change default permission check for regenerate and delete actions
- [`9d81b52`](https://github.com/open-webui/open-webui/commit/9d81b52fc80f67398be86f742fcb3ec94377a014) refac: forward cred to static paths
- [`d32fd2c`](https://github.com/open-webui/open-webui/commit/d32fd2cfa4ec479291913c620e31674865690dfa) feat: improve Chinese translation
- [`e27dfd1`](https://github.com/open-webui/open-webui/commit/e27dfd1b6a878baeab3c2a6c7f6c5bbe4ddfa8a9) chore
- [`3aabba7`](https://github.com/open-webui/open-webui/commit/3aabba74ef43217a62ba397edb899d72a71cd756) fix: yt embed
- [`837669b`](https://github.com/open-webui/open-webui/commit/837669b42351e8c0416b2434b88e07a902c661ee) Changelog dev (#18)
- [`82e87ca`](https://github.com/open-webui/open-webui/commit/82e87ca1a6ef892ce340bf9287c6a8cda85c7896) Update CHANGELOG.md
- [`fb10cb3`](https://github.com/open-webui/open-webui/commit/fb10cb3521419859a1580dc5753739e684a15c41) Update CHANGELOG.md
### 📊 Changes
**339 files changed** (+16275 additions, -6284 deletions)
<details>
<summary>View changed files</summary>
📝 `.github/ISSUE_TEMPLATE/bug_report.yaml` (+8 -5)
📝 `.github/dependabot.yml` (+0 -6)
📝 `.github/pull_request_template.md` (+1 -1)
📝 `.github/workflows/build-release.yml` (+3 -3)
📝 `.github/workflows/deploy-to-hf-spaces.yml` (+1 -1)
📝 `.github/workflows/docker-build.yaml` (+166 -8)
📝 `.github/workflows/format-backend.yaml` (+2 -2)
📝 `.github/workflows/format-build-frontend.yaml` (+4 -4)
📝 `.github/workflows/release-pypi.yml` (+3 -3)
📝 `CHANGELOG.md` (+182 -0)
📝 `Dockerfile` (+16 -3)
➕ `LICENSE_NOTICE` (+11 -0)
📝 `README.md` (+1 -1)
📝 `backend/dev.sh` (+1 -1)
📝 `backend/open_webui/config.py` (+100 -2)
📝 `backend/open_webui/env.py` (+17 -0)
📝 `backend/open_webui/functions.py` (+74 -46)
📝 `backend/open_webui/main.py` (+55 -44)
➕ `backend/open_webui/migrations/versions/38d63c18f30f_add_oauth_session_table.py` (+52 -0)
📝 `backend/open_webui/models/chats.py` (+1 -1)
_...and 80 more files_
</details>
### 📄 Description
# Pull Request Checklist
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests to validate the changes?
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
- ⚙️ Valves modal behavior was improved to properly handle default values and array types, ensuring consistent distinction between custom and default valve states.
### Description
This PR improves the default valves behavior in the Open WebUI interface. The changes address several issues with how valve values are handled, particularly around default values and array types.
**Key improvements:**
- **Backend changes**: Modified the API endpoints to use `model_dump(exclude_unset=True)` to only persist explicitly provided values, preventing unnecessary expansion of default values
- **Frontend changes**: Enhanced the Valves component to properly distinguish between custom values and default values, with improved handling of array types
- **UI improvements**: Better visual indication of when values are using defaults vs custom values
- **Data integrity**: More robust conversion between string and array formats for array-type valves
The changes ensure that when users interact with the valves modal, the system correctly maintains the distinction between default values (which should not be persisted) and custom values (which should be saved), leading to cleaner data storage and more predictable behavior.
### Fixed
- Fixed valves modal not properly handling default values for array types
- Fixed backend API persisting default values when they should remain unset
- Fixed array valve conversion losing empty values during string/array conversion
- Fixed inconsistent behavior between "Default" and "Custom" valve states
---
### Additional Information
This change improves the user experience by making the valves system more intuitive and reliable. The videos demonstrate the improved behavior where the modal now correctly shows "Default" vs "Custom" states and properly handles the transition between them.
The changes are backward compatible and don't affect existing functionality but provide a more robust foundation for valve management.
### Screenshots or Videos
- Valves modal behavior before change:

- Valves modal behavior after change:

### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<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/17663
Author: @jmleksan
Created: 9/22/2025
Status: ❌ Closed
Base:
dev← Head:enh-improved-default-valves-behavior📝 Commits (10+)
fd58c59refac1e19c09refacffacd78feat: change default permission check for regenerate and delete actions9d81b52refac: forward cred to static pathsd32fd2cfeat: improve Chinese translatione27dfd1chore3aabba7fix: yt embed837669bChangelog dev (#18)82e87caUpdate CHANGELOG.mdfb10cb3Update CHANGELOG.md📊 Changes
339 files changed (+16275 additions, -6284 deletions)
View changed files
📝
.github/ISSUE_TEMPLATE/bug_report.yaml(+8 -5)📝
.github/dependabot.yml(+0 -6)📝
.github/pull_request_template.md(+1 -1)📝
.github/workflows/build-release.yml(+3 -3)📝
.github/workflows/deploy-to-hf-spaces.yml(+1 -1)📝
.github/workflows/docker-build.yaml(+166 -8)📝
.github/workflows/format-backend.yaml(+2 -2)📝
.github/workflows/format-build-frontend.yaml(+4 -4)📝
.github/workflows/release-pypi.yml(+3 -3)📝
CHANGELOG.md(+182 -0)📝
Dockerfile(+16 -3)➕
LICENSE_NOTICE(+11 -0)📝
README.md(+1 -1)📝
backend/dev.sh(+1 -1)📝
backend/open_webui/config.py(+100 -2)📝
backend/open_webui/env.py(+17 -0)📝
backend/open_webui/functions.py(+74 -46)📝
backend/open_webui/main.py(+55 -44)➕
backend/open_webui/migrations/versions/38d63c18f30f_add_oauth_session_table.py(+52 -0)📝
backend/open_webui/models/chats.py(+1 -1)...and 80 more files
📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This PR improves the default valves behavior in the Open WebUI interface. The changes address several issues with how valve values are handled, particularly around default values and array types.
Key improvements:
model_dump(exclude_unset=True)to only persist explicitly provided values, preventing unnecessary expansion of default valuesThe changes ensure that when users interact with the valves modal, the system correctly maintains the distinction between default values (which should not be persisted) and custom values (which should be saved), leading to cleaner data storage and more predictable behavior.
Fixed
Additional Information
This change improves the user experience by making the valves system more intuitive and reliable. The videos demonstrate the improved behavior where the modal now correctly shows "Default" vs "Custom" states and properly handles the transition between them.
The changes are backward compatible and don't affect existing functionality but provide a more robust foundation for valve management.
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.