[GH-ISSUE #24019] issue: self.toggle does not work anymore #58822

Closed
opened 2026-05-06 00:14:52 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @AIWintermuteAI on GitHub (Apr 22, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24019

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.9.1 (and also v0.8.12)

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.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 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

According to the docs here
https://docs.openwebui.com/features/extensibility/plugin/functions/filter/#--toggle-filter-example-adding-interactivity-and-icons-new-in-open-webui-0610
and the expectations
if you have self.toggle = True in a filter, it should produce toggleable button.

Image

Actual Behavior

Currently the interface looks like this

Image

Crucially, pressing on these round buttons does not toggle them, instead it disables them.

Steps to Reproduce

Run latest version in Docker
Add toggleable function, for example

from collections.abc import Awaitable, Callable

from pydantic import BaseModel


class Filter:
    class Valves(BaseModel):
        pass

    def __init__(self) -> None:
        self.valves = self.Valves()
        self.toggle = True  # Toggle to disable thinking (OFF = disabled)
        self.icon = """data:image/svg+xml;base64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5NiAxNC4zNzQgOC41IDIyLjg4IDguNSA5LjI2OCAwIDE3Ljk4MS0zLjU2MiAyNC41MzItMTAuMDI0IDYuMDc1LTUuOTk5IDkuNjE0LTEzLjgwNyAxMC4xMDItMjIuMTk4ek03Ny44OTMgMTkuMzY1YzExLjc0NiAyLjMxMyAyMC45NjcgMTEuMDk5IDIzLjcxMSAyMi41NzFINzcuODkzVjE5LjM2NW0tMy45MzgtNC40Njh2MzAuOTc3aDMyLjI3NWMtMS41NDgtMTYuODUtMTUuMTU2LTI5LjkxNC0zMi4yNzUtMzAuOTc3ek02NC42NTEgMTkuMzM4djI2LjgzNUw0NS4zMTMgNjUuMjU0YTMwLjE3NiAzMC4xNzYgMCAwIDEtNC43MjQtMTYuMTljLjAwMi0xNC4yNTkgMTAuMjcyLTI2LjU4MiAyNC4wNjItMjkuNzI2bTMuOTM5LTQuNTg3Yy0xNy44MSAxLjUwNy0zMS45MzYgMTYuNDQ0LTMxLjkzOCAzNC4zMTIgMCA4LjE3OSAyLjg5OCAxNS45NyA4LjIwMiAyMi4xNzZsMjMuNzM2LTIzLjQyVjE0Ljc1MXoiLz48L3N2Zz4="""

    async def inlet(
        self,
        body: dict,
        __event_emitter__: Callable[[dict], Awaitable[None]],
        __user__: dict | None = None,
    ) -> dict:
        try:
            body["chat_template_kwargs"] = {
                "enable_thinking": self.toggle,
            }

            # Status notification
            status_message = "Thinking enabled" if self.toggle else "Thinking disabled"

            await __event_emitter__(
                {
                    "type": "status",
                    "data": {
                        "description": f"Qwen3.0 {status_message}",
                        "done": True,
                        "hidden": False,
                    },
                }
            )

        except Exception as e:
            await __event_emitter__(
                {
                    "type": "status",
                    "data": {
                        "description": f"Error in thinking toggle: {e}",
                        "done": True,
                        "hidden": False,
                    },
                }
            )

        return body

Logs & Screenshots

Image

Additional Information

No response

Originally created by @AIWintermuteAI on GitHub (Apr 22, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/24019 ### 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.9.1 (and also v0.8.12) ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.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 **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 According to the docs here https://docs.openwebui.com/features/extensibility/plugin/functions/filter/#--toggle-filter-example-adding-interactivity-and-icons-new-in-open-webui-0610 and the expectations if you have self.toggle = True in a filter, it should produce toggleable button. <img width="849" height="308" alt="Image" src="https://github.com/user-attachments/assets/daea5fa9-e835-4f43-9fbf-57b7307c5ea6" /> ### Actual Behavior Currently the interface looks like this <img width="1640" height="544" alt="Image" src="https://github.com/user-attachments/assets/6cc1b2ff-d6e3-419d-a0df-acc909447123" /> Crucially, pressing on these round buttons does not toggle them, instead it disables them. ### Steps to Reproduce Run latest version in Docker Add toggleable function, for example ``` from collections.abc import Awaitable, Callable from pydantic import BaseModel class Filter: class Valves(BaseModel): pass def __init__(self) -> None: self.valves = self.Valves() self.toggle = True # Toggle to disable thinking (OFF = disabled) self.icon = """data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAw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E3Ljk4MS0zLjU2MiAyNC41MzItMTAuMDI0IDYuMDc1LTUuOTk5IDkuNjE0LTEzLjgwNyAxMC4xMDItMjIuMTk4ek03Ny44OTMgMTkuMzY1YzExLjc0NiAyLjMxMyAyMC45NjcgMTEuMDk5IDIzLjcxMSAyMi41NzFINzcuODkzVjE5LjM2NW0tMy45MzgtNC40Njh2MzAuOTc3aDMyLjI3NWMtMS41NDgtMTYuODUtMTUuMTU2LTI5LjkxNC0zMi4yNzUtMzAuOTc3ek02NC42NTEgMTkuMzM4djI2LjgzNUw0NS4zMTMgNjUuMjU0YTMwLjE3NiAzMC4xNzYgMCAwIDEtNC43MjQtMTYuMTljLjAwMi0xNC4yNTkgMTAuMjcyLTI2LjU4MiAyNC4wNjItMjkuNzI2bTMuOTM5LTQuNTg3Yy0xNy44MSAxLjUwNy0zMS45MzYgMTYuNDQ0LTMxLjkzOCAzNC4zMTIgMCA4LjE3OSAyLjg5OCAxNS45NyA4LjIwMiAyMi4xNzZsMjMuNzM2LTIzLjQyVjE0Ljc1MXoiLz48L3N2Zz4=""" async def inlet( self, body: dict, __event_emitter__: Callable[[dict], Awaitable[None]], __user__: dict | None = None, ) -> dict: try: body["chat_template_kwargs"] = { "enable_thinking": self.toggle, } # Status notification status_message = "Thinking enabled" if self.toggle else "Thinking disabled" await __event_emitter__( { "type": "status", "data": { "description": f"Qwen3.0 {status_message}", "done": True, "hidden": False, }, } ) except Exception as e: await __event_emitter__( { "type": "status", "data": { "description": f"Error in thinking toggle: {e}", "done": True, "hidden": False, }, } ) return body ``` ### Logs & Screenshots <img width="1640" height="544" alt="Image" src="https://github.com/user-attachments/assets/6cc1b2ff-d6e3-419d-a0df-acc909447123" /> ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-06 00:14:52 -05:00
Author
Owner

@tjbck commented on GitHub (Apr 24, 2026):

Intended behaviour @Classic298 docs needs to be updated here.

<!-- gh-comment-id:4311408933 --> @tjbck commented on GitHub (Apr 24, 2026): Intended behaviour @Classic298 docs needs to be updated here.
Author
Owner

@AIWintermuteAI commented on GitHub (Apr 24, 2026):

@tjbck could you clarify a bit? What if I do need a toggle, such as Thinking toggle
https://github.com/open-webui/open-webui/issues/21893
how does it work now?

<!-- gh-comment-id:4311507456 --> @AIWintermuteAI commented on GitHub (Apr 24, 2026): @tjbck could you clarify a bit? What if I do need a toggle, such as Thinking toggle https://github.com/open-webui/open-webui/issues/21893 how does it work now?
Author
Owner

@Classic298 commented on GitHub (Apr 24, 2026):

@AIWintermuteAI in 0.9.0 to allow for filter valves to be displayed, some changes were made

I believe now the toggle can be toggled on and off from chat if you click it - so no more explicit visual toggle, just press the icon to disable it

<!-- gh-comment-id:4311547329 --> @Classic298 commented on GitHub (Apr 24, 2026): @AIWintermuteAI in 0.9.0 to allow for filter valves to be displayed, some changes were made I believe now the toggle can be toggled on and off from chat if you click it - so no more explicit visual toggle, just press the icon to disable it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58822