regression: filter function: body messages modification in inlet are overruled #4079

Closed
opened 2025-11-11 15:45:42 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @thiswillbeyourgithub on GitHub (Feb 23, 2025).

Bug Report

Installation Method

docker compose

Environment

  • Open WebUI Version: 0.5.16

Confirmation:

  • [ x ] I have read and followed all the instructions provided in the README.md.
  • [ x ] I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Modification to the body of the message inside an inlet filter function should not be discarded

Actual Behavior:

The filters that modify the body seem to have their modification overruled after the inlet is applied.

Description

Bug Summary:
The filters that modify the body seem to have their modification overruled after the inlet is applied.

Reproduction Details

  1. Create a new model
  2. Add for example my turn limiting filter or this one
  3. Set as system message You tell me the number of messages you see in the chat, to help me debug stuff. I want to know how many system prompt, user messages and asssitant messages there are.
  4. Make sure no other filters that could interfere are enabled.
  5. Send to the LLM "hi"
  6. Notice that he modification to body is overruled somewhere

Image

This was also confirmed by using my debug filter to inspect the body in an inlet applied after the turn limiter.

Additional Information

I think this is a regression.

Note

Initially mentioned here

edit: i'm not able to reproduice it anymore. I have a hunch this is something deepeer that makes it non deterministic.

Originally created by @thiswillbeyourgithub on GitHub (Feb 23, 2025). # Bug Report ## Installation Method docker compose ## Environment - **Open WebUI Version:** 0.5.16 **Confirmation:** - [ x ] I have read and followed all the instructions provided in the README.md. - [ x ] I am on 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 the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Modification to the body of the message inside an inlet filter function should not be discarded ## Actual Behavior: The filters that modify the body seem to have their modification overruled after the inlet is applied. ## Description **Bug Summary:** The filters that modify the body seem to have their modification overruled after the inlet is applied. ## Reproduction Details 1. Create a new model 2. Add for example [my turn limiting filter](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/main/filters/infinite_chat.py) or [this one](https://openwebui.com/f/keke/context_length_filter) 3. Set as system message `You tell me the number of messages you see in the chat, to help me debug stuff. I want to know how many system prompt, user messages and asssitant messages there are.` 4. Make sure no other filters that could interfere are enabled. 5. Send to the LLM "hi" 6. Notice that he modification to body is overruled somewhere ![Image](https://github.com/user-attachments/assets/509ece5b-8212-44e4-ac05-41a395df378f) This was also confirmed by using [my debug filter](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/main/filters/debug_filter.py) to inspect the body in an inlet applied after the turn limiter. ## Additional Information I think this is a regression. ## Note Initially mentioned [here](https://github.com/open-webui/open-webui/discussions/4608#discussioncomment-12293452) edit: i'm not able to reproduice it anymore. I have a hunch this is something deepeer that makes it non deterministic.
Author
Owner

@arneschreuder commented on GitHub (Feb 25, 2025):

Thank you for this. I also had this issue. I will check if it works a little bit later today.

@arneschreuder commented on GitHub (Feb 25, 2025): Thank you for this. I also had this issue. I will check if it works a little bit later today.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4079