[GH-ISSUE #14270] issue: Multiple toggle filters cannot work properly at the same time #32727

Closed
opened 2026-04-25 06:36:12 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @fl0w1nd on GitHub (May 24, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14270

Check Existing Issues

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

Installation Method

Docker

Open WebUI Version

v0.6.10

Ollama Version (if applicable)

No response

Operating System

Ubuntu 22.04

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 listed steps to reproduce the bug in detail.

Expected Behavior

Each Toggle Filter can operate normally based on the enabled state of the button.

Actual Behavior

When the same model configuration has two Toggle Filters, here assuming they are Filter A and Filter B, and Filter A is created before Filter B.
When we don't have any Toggle Filters buttons enabled in the chat, Filter B is still triggered

Steps to Reproduce

  1. Create two filters with the latest "Toggle Filter" feature, For example, Filter_A and Filter_B.

Filter_A

"""
title: filter A
description: filter A
"""

from pydantic import BaseModel, Field
from typing import Optional, List, Dict, Any


class Filter:
    class Valves(BaseModel):
        priority: int = Field(default=100, description="priority")
        pass

    def __init__(self):
        self.valves = self.Valves()
        self.toggle = True
        self.icon = """data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgY2xhc3M9InNpemUtNSI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwIDAgOC43MTYtNi43NDdNMTIgMjFhOS4wMDQgOS4wMDQgMCAwIDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAgMSA3Ljg0MyA0LjU4Mk0xMiAzYTguOTk3IDguOTk3IDAgMCAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwIDEgMTIgMTAuNWMtMi45OTggMC01Ljc0LTEuMS03Ljg0My0yLjkxOG0xNS42ODYgMEE4Ljk1OSA4Ljk1OSAwIDAgMSAyMSAxMmMwIC43NzgtLjA5OSAxLjUzMy0uMjg0IDIuMjUzbTAgMEExNy45MTkgMTcuOTE5IDAgMCAxIDEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwIDEgMyAxMmMwLTEuNjA1LjQyLTMuMTEzIDEuMTU3LTQuNDE4Ij48L3BhdGg+PC9zdmc+"""
        pass

    def inlet(self, body: dict, user: Optional[dict] = None) -> dict:

        print("filter_a enable")

        return body

Filter_B

"""
title: filter B
description: filter B
"""

from pydantic import BaseModel, Field
from typing import Optional, List, Dict, Any


class Filter:
    class Valves(BaseModel):
        priority: int = Field(default=100, description="priority")
        pass

    def __init__(self):
        self.valves = self.Valves()
        self.toggle = True
        self.icon = """data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgY2xhc3M9InNpemUtNSI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwIDAgOC43MTYtNi43NDdNMTIgMjFhOS4wMDQgOS4wMDQgMCAwIDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAgMSA3Ljg0MyA0LjU4Mk0xMiAzYTguOTk3IDguOTk3IDAgMCAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwIDEgMTIgMTAuNWMtMi45OTggMC01Ljc0LTEuMS03Ljg0My0yLjkxOG0xNS42ODYgMEE4Ljk1OSA4Ljk1OSAwIDAgMSAyMSAxMmMwIC43NzgtLjA5OSAxLjUzMy0uMjg0IDIuMjUzbTAgMEExNy45MTkgMTcuOTE5IDAgMCAxIDEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwIDEgMyAxMmMwLTEuNjA1LjQyLTMuMTEzIDEuMTU3LTQuNDE4Ij48L3BhdGg+PC9zdmc+"""
        pass

    def inlet(self, body: dict, user: Optional[dict] = None) -> dict:

        print("filter_b enable")

        return body
  1. Enable these two filters and configure a model to enable these two filters.

Image

  1. Send a message with the model,and don't turn on Filter_A or Filter_B

Image

  1. Checked the logs and found that Filter_B was enabled, in fact I did not turn on the Filter_B button.
2025-05-24 09:03:13.326 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 62.3.41.101:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {}
filter_b enable
2025-05-24 09:03:13.860 | INFO     | open_webui.routers.openai:get_all_models:391 - get_all_models() - {}
  1. conclusion

Multiple toggle filters cannot work properly at the same time

Logs & Screenshots

  1. Image

  2. Image

  3. Image

Additional Information

No response

Originally created by @fl0w1nd on GitHub (May 24, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14270 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.10 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 22.04 ### 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 listed steps to reproduce the bug in detail. ### Expected Behavior Each Toggle Filter can operate normally based on the enabled state of the button. ### Actual Behavior When the same model configuration has two Toggle Filters, here assuming they are Filter A and Filter B, and Filter A is created before Filter B. When we don't have any Toggle Filters buttons enabled in the chat, Filter B is still triggered ### Steps to Reproduce 1. Create two filters with the latest "Toggle Filter" feature, For example, Filter_A and Filter_B. Filter_A ```py """ title: filter A description: filter A """ from pydantic import BaseModel, Field from typing import Optional, List, Dict, Any class Filter: class Valves(BaseModel): priority: int = Field(default=100, description="priority") pass def __init__(self): self.valves = self.Valves() self.toggle = True self.icon = """data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgY2xhc3M9InNpemUtNSI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwIDAgOC43MTYtNi43NDdNMTIgMjFhOS4wMDQgOS4wMDQgMCAwIDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAgMSA3Ljg0MyA0LjU4Mk0xMiAzYTguOTk3IDguOTk3IDAgMCAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwIDEgMTIgMTAuNWMtMi45OTggMC01Ljc0LTEuMS03Ljg0My0yLjkxOG0xNS42ODYgMEE4Ljk1OSA4Ljk1OSAwIDAgMSAyMSAxMmMwIC43NzgtLjA5OSAxLjUzMy0uMjg0IDIuMjUzbTAgMEExNy45MTkgMTcuOTE5IDAgMCAxIDEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwIDEgMyAxMmMwLTEuNjA1LjQyLTMuMTEzIDEuMTU3LTQuNDE4Ij48L3BhdGg+PC9zdmc+""" pass def inlet(self, body: dict, user: Optional[dict] = None) -> dict: print("filter_a enable") return body ``` Filter_B ```py """ title: filter B description: filter B """ from pydantic import BaseModel, Field from typing import Optional, List, Dict, Any class Filter: class Valves(BaseModel): priority: int = Field(default=100, description="priority") pass def __init__(self): self.valves = self.Valves() self.toggle = True self.icon = """data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjc1IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgY2xhc3M9InNpemUtNSI+PHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwIDAgOC43MTYtNi43NDdNMTIgMjFhOS4wMDQgOS4wMDQgMCAwIDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAgMSA3Ljg0MyA0LjU4Mk0xMiAzYTguOTk3IDguOTk3IDAgMCAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwIDEgMTIgMTAuNWMtMi45OTggMC01Ljc0LTEuMS03Ljg0My0yLjkxOG0xNS42ODYgMEE4Ljk1OSA4Ljk1OSAwIDAgMSAyMSAxMmMwIC43NzgtLjA5OSAxLjUzMy0uMjg0IDIuMjUzbTAgMEExNy45MTkgMTcuOTE5IDAgMCAxIDEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwIDEgMyAxMmMwLTEuNjA1LjQyLTMuMTEzIDEuMTU3LTQuNDE4Ij48L3BhdGg+PC9zdmc+""" pass def inlet(self, body: dict, user: Optional[dict] = None) -> dict: print("filter_b enable") return body ``` 2. Enable these two filters and configure a model to enable these two filters. ![Image](https://github.com/user-attachments/assets/7faeec3a-c791-4f17-a557-53d7f7ce41d1) 3. Send a message with the model,and don't turn on Filter_A or Filter_B ![Image](https://github.com/user-attachments/assets/4a4f83ff-b820-4bd7-811c-70ab284491b1) 4. Checked the logs and found that Filter_B was enabled, in fact I did not turn on the Filter_B button. ```log 2025-05-24 09:03:13.326 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 62.3.41.101:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 - {} filter_b enable 2025-05-24 09:03:13.860 | INFO | open_webui.routers.openai:get_all_models:391 - get_all_models() - {} ``` 5. conclusion Multiple toggle filters cannot work properly at the same time ### Logs & Screenshots 1. ![Image](https://github.com/user-attachments/assets/7faeec3a-c791-4f17-a557-53d7f7ce41d1) 2. ![Image](https://github.com/user-attachments/assets/4a4f83ff-b820-4bd7-811c-70ab284491b1) 3. ![Image](https://github.com/user-attachments/assets/a119a32e-6067-47ce-b50d-0749818db31c) ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 06:36:12 -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#32727