[PR #23147] [CLOSED] feat(config): add environment variable support for DEFAULT_MODEL_PARAMS #42681

Closed
opened 2026-04-25 14:29:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23147
Author: @dkhachyan
Created: 3/27/2026
Status: Closed

Base: mainHead: default-model-params-env


📝 Commits (1)

  • c1a39d4 feat(config): add environment variable support for DEFAULT_MODEL_PARAMS

📊 Changes

1 file changed (+7 additions, -1 deletions)

View changed files

📝 backend/open_webui/config.py (+7 -1)

📄 Description

Pull Request Description

Title: fix: DEFAULT_MODEL_PARAMS environment variable ignored

Changelog Entry

Description

The DEFAULT_MODEL_PARAMS environment variable was being ignored due to a hardcoded empty dictionary {} being passed as the default value to PersistentConfig. This fix adds proper JSON parsing of the DEFAULT_MODEL_PARAMS environment variable, following the same pattern used by similar configurations like TOOL_SERVER_CONNECTIONS and TERMINAL_SERVER_CONNECTIONS.

Fixed

  • Fixed DEFAULT_MODEL_PARAMS environment variable being ignored - the value is now properly parsed from JSON and passed to PersistentConfig

Additional Information

https://github.com/open-webui/open-webui/discussions/21839

Usage example:

export DEFAULT_MODEL_PARAMS='{"temperature": 0.7, "max_tokens": 2048}'

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/23147 **Author:** [@dkhachyan](https://github.com/dkhachyan) **Created:** 3/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `default-model-params-env` --- ### 📝 Commits (1) - [`c1a39d4`](https://github.com/open-webui/open-webui/commit/c1a39d44300ef6df22d25375c90769e54af19986) feat(config): add environment variable support for DEFAULT_MODEL_PARAMS ### 📊 Changes **1 file changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+7 -1) </details> ### 📄 Description ## Pull Request Description **Title:** `fix: DEFAULT_MODEL_PARAMS environment variable ignored` <!-- ⚠️ CRITICAL CHECKS FOR CONTRIBUTORS (READ, DON'T DELETE) ⚠️ 1. Target the `dev` branch. PRs targeting `main` will be automatically closed. 2. Do NOT delete the CLA section at the bottom. It is required for the bot to accept your PR. --> # Changelog Entry ### Description The `DEFAULT_MODEL_PARAMS` environment variable was being ignored due to a hardcoded empty dictionary `{}` being passed as the default value to `PersistentConfig`. This fix adds proper JSON parsing of the `DEFAULT_MODEL_PARAMS` environment variable, following the same pattern used by similar configurations like `TOOL_SERVER_CONNECTIONS` and `TERMINAL_SERVER_CONNECTIONS`. ### Fixed - Fixed `DEFAULT_MODEL_PARAMS` environment variable being ignored - the value is now properly parsed from JSON and passed to `PersistentConfig` --- ### Additional Information https://github.com/open-webui/open-webui/discussions/21839 **Usage example:** ```bash export DEFAULT_MODEL_PARAMS='{"temperature": 0.7, "max_tokens": 2048}' ``` ### Contributor License Agreement - [x] 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>
GiteaMirror added the pull-request label 2026-04-25 14:29:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#42681