[GH-ISSUE #19214] issue: default model params take precedence over user-specified model params #57473

Closed
opened 2026-05-05 20:57:45 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Simon-Stone on GitHub (Nov 16, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19214

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.6.36

Ollama Version (if applicable)

No response

Operating System

Mac OS

Browser (if applicable)

Chrome

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Model parameters specified in the chat controls (e.g., setting Reasoning Effort to high) should override any default model parameters specified in the Model admin settings (e.g., Reasoning Effort set to low).

Actual Behavior

The parameter precedence is backwards: If a default value is specified in the admin Model settings, the value overrides any value specified for the same key in the chat controls.

Steps to Reproduce

  • Set up a reasoning model using an OpenAI connection
  • Set Reasoning Effort to low in the admin Model settings
  • Start a new chat with that model
  • Set Reasoning Effort to high in the Chat Controls
  • Inspect the outgoing request. The parameter reasoning_effort will be "low".

Logs & Screenshots

N/A

Additional Information

I believe the key change needs to be made in this part:

def apply_model_params_to_body(
    params: dict, form_data: dict, mappings: dict[str, Callable]
) -> dict:
    if not params:
        return form_data

    for key, value in params.items():
        if value is not None and key not in form_data:   # Key change here: check if key does not already exist in form (i.e., was specified by the user)
            if key in mappings:
                cast_func = mappings[key]
                if isinstance(cast_func, Callable):
                    form_data[key] = cast_func(value)
            else:
                form_data[key] = value

    return form_data
Originally created by @Simon-Stone on GitHub (Nov 16, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/19214 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.6.36 ### Ollama Version (if applicable) _No response_ ### Operating System Mac OS ### Browser (if applicable) Chrome ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Model parameters specified in the chat controls (e.g., setting `Reasoning Effort` to `high`) should override any default model parameters specified in the Model admin settings (e.g., `Reasoning Effort` set to `low`). ### Actual Behavior The parameter precedence is backwards: If a default value is specified in the admin Model settings, the value overrides any value specified for the same key in the chat controls. ### Steps to Reproduce - Set up a reasoning model using an OpenAI connection - Set `Reasoning Effort` to `low` in the admin Model settings - Start a new chat with that model - Set `Reasoning Effort` to `high` in the Chat Controls - Inspect the outgoing request. The parameter `reasoning_effort` will be `"low"`. ### Logs & Screenshots N/A ### Additional Information I believe the key change needs to be made in [this part](https://github.com/open-webui/open-webui/blob/e0d5de16978786b8a7538adf1efcde5258f38faf/backend/open_webui/utils/payload.py#L51): ```python def apply_model_params_to_body( params: dict, form_data: dict, mappings: dict[str, Callable] ) -> dict: if not params: return form_data for key, value in params.items(): if value is not None and key not in form_data: # Key change here: check if key does not already exist in form (i.e., was specified by the user) if key in mappings: cast_func = mappings[key] if isinstance(cast_func, Callable): form_data[key] = cast_func(value) else: form_data[key] = value return form_data ```
GiteaMirror added the bug label 2026-05-05 20:57:45 -05:00
Author
Owner

@tjbck commented on GitHub (Nov 16, 2025):

Intended behaviour here for security purposes.

<!-- gh-comment-id:3539425338 --> @tjbck commented on GitHub (Nov 16, 2025): [Intended behaviour](https://docs.openwebui.com/features/chat-features/chat-params) here for security purposes.
Author
Owner

@Simon-Stone commented on GitHub (Nov 16, 2025):

Oh, wow, that's surprising. I can see this make sense for a system prompt, but I'm not sure how reasoning effort or temperature would be security risks.

This normally wouldn't be a problem because we could just not specify the parameters we want users to be able to change, but with GPT 5.1 requiring an explicit parameter value for reasoning effort (no server default), this means we cannot allow users to change it (because we have to set an explicit default which then will always take precedence).

Would you be open to a pull request that adds a "lock parameter" feature? Basically, in the admin model parameter section, a little lock icon allows the admin to lock parameter values down or leave them open to user overrides.

<!-- gh-comment-id:3539430002 --> @Simon-Stone commented on GitHub (Nov 16, 2025): Oh, wow, that's surprising. I can see this make sense for a system prompt, but I'm not sure how reasoning effort or temperature would be security risks. This normally wouldn't be a problem because we could just not specify the parameters we want users to be able to change, but with GPT 5.1 requiring an explicit parameter value for reasoning effort (no server default), this means we cannot allow users to change it (because we have to set an explicit default which then will always take precedence). Would you be open to a pull request that adds a "lock parameter" feature? Basically, in the admin model parameter section, a little lock icon allows the admin to lock parameter values down or leave them open to user overrides.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57473