[GH-ISSUE #14785] issue: Filter Functions losting system prompts and advanced parameters #32890

Closed
opened 2026-04-25 06:44:40 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @vibe-Chen on GitHub (Jun 8, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14785

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Pip Install

Open WebUI Version

v0.6.13

Ollama Version (if applicable)

No response

Operating System

Windows 10

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

Filter Functions can read (and manipulate) system prompts.
In addition, Filter Functions can read both admin-set system prompts and user-set system prompts (per chat takes the first place, per account if no).

Actual Behavior

Filter Functions can't see system prompts, and once those functions activated, existing system prompts (set by user or admin) get lost.
In addition, most of the advanced parameters get lost too.

Steps to Reproduce

  1. Setup any type of open-webui instance.
  2. Connect this instance with any chat completion endpoints. (I use KTransformers OpenAI-compatible ones, and found this bug with a simple request handler)
  3. Create a Filter Function (Foo for example), and simply pass the body as is.
  4. Activate the Foo for any of the models (Whale for example).
  5. Set a system prompt for Whale.
  6. Send a message to Whale while Foo is activated as a Filter Function for it.
  7. Check the POST request actually sent to Whale.

To compare:

  1. Deactivate all Filter Function.
  2. Do the same.
  3. Send a message to Whale with no Filter Function for it.
  4. Check and compare the POST request, with and without the Filter Function.

Logs & Screenshots

Screenshot (contains a tiny log):
Image
The function used in this example (though it's not a issue of the function itself):
https://openwebui.com/f/keke/context_length_filter
My simple POST handler, written with the help of AI:
https://pastebin.com/vpkM0Ehp

Additional Information

No response

Originally created by @vibe-Chen on GitHub (Jun 8, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14785 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Pip Install ### Open WebUI Version v0.6.13 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 10 ### 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 Filter Functions can read (and manipulate) system prompts. In addition, Filter Functions can read both admin-set system prompts and user-set system prompts (per chat takes the first place, per account if no). ### Actual Behavior Filter Functions can't see system prompts, and once those functions activated, existing system prompts (set by user or admin) get lost. In addition, most of the advanced parameters get lost too. ### Steps to Reproduce 1. Setup any type of open-webui instance. 2. Connect this instance with any chat completion endpoints. (I use KTransformers OpenAI-compatible ones, and found this bug with a simple request handler) 3. Create a Filter Function (Foo for example), and simply pass the body as is. 4. Activate the Foo for any of the models (Whale for example). 5. Set a system prompt for Whale. 6. Send a message to Whale while Foo is activated as a Filter Function for it. 7. Check the POST request actually sent to Whale. To compare: 4. Deactivate all Filter Function. 5. Do the same. 6. Send a message to Whale with no Filter Function for it. 7. Check and compare the POST request, with and without the Filter Function. ### Logs & Screenshots Screenshot (contains a tiny log): ![Image](https://github.com/user-attachments/assets/e5fbd73d-ec31-4b73-8a63-c5ca80387eb3) The function used in this example (though it's not a issue of the function itself): https://openwebui.com/f/keke/context_length_filter My simple POST handler, written with the help of AI: https://pastebin.com/vpkM0Ehp ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 06:44:40 -05:00
Author
Owner

@tjbck commented on GitHub (Jun 8, 2025):

Intended behaviour, filter functions are always called first before any model specific configurations are applied.

<!-- gh-comment-id:2954136128 --> @tjbck commented on GitHub (Jun 8, 2025): Intended behaviour, filter functions are always called first before any model specific configurations are applied.
Author
Owner

@vibe-Chen commented on GitHub (Jun 8, 2025):

Intended behaviour, filter functions are always called first before any model specific configurations are applied.

I'm sorry, but almost no model specific configurations are applied if Filter Functions are active - check the screenshot and see the POST I've got.

<!-- gh-comment-id:2954143506 --> @vibe-Chen commented on GitHub (Jun 8, 2025): > Intended behaviour, filter functions are always called first before any model specific configurations are applied. I'm sorry, but almost no model specific configurations are applied if Filter Functions are active - check the screenshot and see the POST I've got.
Author
Owner

@tjbck commented on GitHub (Jun 8, 2025):

Filter functions are called before model configs are applied, hence no model params. Hope that clarifies!

<!-- gh-comment-id:2954292755 --> @tjbck commented on GitHub (Jun 8, 2025): Filter functions are called before model configs are applied, hence no model params. Hope that clarifies!
Author
Owner

@vibe-Chen commented on GitHub (Jun 9, 2025):

Filter functions are called before model configs are applied, hence no model params. Hope that clarifies!

You still not checking any of the info I've provided - or you shall notice that model params get disappeared when filter functions are active. They just not applying, regardless of order.

<!-- gh-comment-id:2955363572 --> @vibe-Chen commented on GitHub (Jun 9, 2025): > Filter functions are called before model configs are applied, hence no model params. Hope that clarifies! You still not checking any of the info I've provided - or you shall notice that model params get disappeared when filter functions are active. They just not applying, regardless of order.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#32890