issue: Custom parameters are unnecessarily nested under "custom_params" instead of being placed directly under "params" #6893

Open
opened 2025-11-11 17:08:49 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @Restricted18 on GitHub (Nov 11, 2025).

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

Docker

Open WebUI Version

v0.6.36

Ollama Version (if applicable)

No response

Operating System

Windows 11

Browser (if applicable)

No response

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

Custom parameters defined in Models > (Model) > Advanced Params should be placed directly under "params" in the JSON structure, without being wrapped in a "custom_params" object.

For example, when setting:

custom_param_name: safetySettings
custom_param_value: [{"category":"HARM_CATEGORY_DANGEROUS_CONTENT","threshold":"BLOCK_ONLY_HIGH"}]

The JSON Preview should display:

"params": {
  "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]",
  "seed": 0
}

This allows OpenAI-compatible APIs like Google Gemini to properly recognize and apply parameters such as safetySettings.

Actual Behavior

Custom parameters are automatically nested inside a "custom_params" object, as shown in the JSON Preview:

"params": {
  "custom_params": {
    "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]"
  },
  "seed": 0
}

This nesting causes some OpenAI-compatible APIs (such as Google Gemini) to ignore these parameters, as they expect specific parameter names directly under "params". As a result, legitimate API fields like safetySettings cannot be sent properly.

Steps to Reproduce

  1. Open OpenWebUI and navigate to Models
  2. Select a model configured to use an OpenAI-compatible API (e.g., Google Gemini)
  3. Click on the model to open its settings
  4. Scroll down to Advanced Params section
  5. In the custom_param_name field, enter: safetySettings
  6. In the custom_param_value field, enter: [{"category":"HARM_CATEGORY_DANGEROUS_CONTENT","threshold":"BLOCK_ONLY_HIGH"}]
  7. Observe the JSON Preview displayed below the Advanced Params section
  8. Note that the parameter is nested under "custom_params" instead of appearing directly under "params"

Result: The JSON Preview shows:

"params": {
  "custom_params": {
    "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]"
  }
}

Expected: The JSON Preview should show:

"params": {
  "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]"
}

Logs & Screenshots

JSON Preview showing the issue:

"params": {
  "custom_params": {
    "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]"
  },
  "seed": 0
}

Additional Information

Context:
OpenAI-compatible APIs expects parameters like safetySettings to be placed directly under "params". The current automatic nesting under "custom_params" breaks compatibility with these APIs.

Suggested Solution:
Allow custom parameters to be added directly under "params" without the "custom_params" wrapper, unless the user explicitly names their field "custom_params". This would maintain compatibility with OpenAI-compatible APIs that require specific parameter names at the top level.

Originally created by @Restricted18 on GitHub (Nov 11, 2025). ### 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 Docker ### Open WebUI Version v0.6.36 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 11 ### Browser (if applicable) _No response_ ### 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 Custom parameters defined in **Models > (Model) > Advanced Params** should be placed directly under `"params"` in the JSON structure, without being wrapped in a `"custom_params"` object. For example, when setting: ``` custom_param_name: safetySettings custom_param_value: [{"category":"HARM_CATEGORY_DANGEROUS_CONTENT","threshold":"BLOCK_ONLY_HIGH"}] ``` The **JSON Preview** should display: ```json "params": { "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]", "seed": 0 } ``` This allows OpenAI-compatible APIs like Google Gemini to properly recognize and apply parameters such as `safetySettings`. ### Actual Behavior Custom parameters are automatically nested inside a `"custom_params"` object, as shown in the **JSON Preview**: ```json "params": { "custom_params": { "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]" }, "seed": 0 } ``` This nesting causes some OpenAI-compatible APIs (such as Google Gemini) to ignore these parameters, as they expect specific parameter names directly under `"params"`. As a result, legitimate API fields like `safetySettings` cannot be sent properly. ### Steps to Reproduce 1. Open OpenWebUI and navigate to **Models** 2. Select a model configured to use an OpenAI-compatible API (e.g., Google Gemini) 3. Click on the model to open its settings 4. Scroll down to **Advanced Params** section 5. In the **custom_param_name** field, enter: `safetySettings` 6. In the **custom_param_value** field, enter: `[{"category":"HARM_CATEGORY_DANGEROUS_CONTENT","threshold":"BLOCK_ONLY_HIGH"}]` 7. Observe the **JSON Preview** displayed below the Advanced Params section 8. Note that the parameter is nested under `"custom_params"` instead of appearing directly under `"params"` **Result**: The JSON Preview shows: ```json "params": { "custom_params": { "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]" } } ``` **Expected**: The JSON Preview should show: ```json "params": { "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]" } ``` ### Logs & Screenshots **JSON Preview showing the issue:** ```json "params": { "custom_params": { "safetySettings": "[{\"category\":\"HARM_CATEGORY_DANGEROUS_CONTENT\",\"threshold\":\"BLOCK_ONLY_HIGH\"}]" }, "seed": 0 } ``` ### Additional Information **Context:** OpenAI-compatible APIs expects parameters like `safetySettings` to be placed directly under `"params"`. The current automatic nesting under `"custom_params"` breaks compatibility with these APIs. **Suggested Solution:** Allow custom parameters to be added directly under `"params"` without the `"custom_params"` wrapper, unless the user explicitly names their field `"custom_params"`. This would maintain compatibility with OpenAI-compatible APIs that require specific parameter names at the top level.
GiteaMirror added the bug label 2025-11-11 17:08:49 -06: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#6893