[GH-ISSUE #14867] feat: Add support to toggle thinking (sending reasoning_effort) for supported models #56051

Closed
opened 2026-05-05 18:36:18 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @fkrauthan on GitHub (Jun 11, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14867

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I am leveraging LiteLLM to hookup things like Claude Sonnet and Opus to Open WebUI. Both models support an optional thinking mode. To enable that (per LiteLLM docs here) it can be enabled by sending reasoning_effort.

Desired Solution you'd like

Since I not always want that it would be great if I could enable an optional "Thinking" tool/mode on a model which will set the reasoning_effort to a per model configured default value.

Alternatives Considered

I guess a custom tool could be written but as it seem to be an OpenAI supported attribute it makes sense to support this out of the box.

Additional Context

No response

Originally created by @fkrauthan on GitHub (Jun 11, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/14867 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I am leveraging LiteLLM to hookup things like Claude Sonnet and Opus to Open WebUI. Both models support an optional thinking mode. To enable that (per LiteLLM docs [here](https://docs.litellm.ai/docs/providers/anthropic#usage---thinking--reasoning_content)) it can be enabled by sending `reasoning_effort`. ### Desired Solution you'd like Since I not always want that it would be great if I could enable an optional "Thinking" tool/mode on a model which will set the `reasoning_effort` to a per model configured default value. ### Alternatives Considered I guess a custom tool could be written but as it seem to be an OpenAI supported attribute it makes sense to support this out of the box. ### Additional Context _No response_
Author
Owner

@suurt8ll commented on GitHub (Jun 11, 2025):

It would also be nice if Pipe functions could be aware of how this is toggled. I'm using Gemini models through my own pipe manifold and the latest one's support this same toggling behavior.

<!-- gh-comment-id:2961237970 --> @suurt8ll commented on GitHub (Jun 11, 2025): It would also be nice if Pipe functions could be aware of how this is toggled. I'm using Gemini models through my own pipe manifold and the latest one's support this same toggling behavior.
Author
Owner

@jrkropp commented on GitHub (Jun 11, 2025):

You can already accomplish this via a Filter toggle. Adds a reasoning toggle like ChatGPT. https://github.com/jrkropp/open-webui-developer-toolkit/blob/development/functions/filters/reason_toggle_filter/reason_toggle_filter.py

class Filter:
    def __init__(self) -> None:
        self.valves = self.Valves()
        self.toggle = True

    async def inlet(
        self,
        body: dict,
        __event_emitter__: Callable[[dict[str, Any]], Awaitable[None]],
        __metadata__: dict | None = None,
    ) -> dict:

        body["reasoning_effort"] = "medium"

        # Pass the updated request body downstream
        return body
<!-- gh-comment-id:2961238589 --> @jrkropp commented on GitHub (Jun 11, 2025): You can already accomplish this via a Filter toggle. Adds a reasoning toggle like ChatGPT. https://github.com/jrkropp/open-webui-developer-toolkit/blob/development/functions/filters/reason_toggle_filter/reason_toggle_filter.py ``` class Filter: def __init__(self) -> None: self.valves = self.Valves() self.toggle = True async def inlet( self, body: dict, __event_emitter__: Callable[[dict[str, Any]], Awaitable[None]], __metadata__: dict | None = None, ) -> dict: body["reasoning_effort"] = "medium" # Pass the updated request body downstream return body ```
Author
Owner

@suurt8ll commented on GitHub (Jun 11, 2025):

Wow I did not know about Filter.toggle. Thanks!

<!-- gh-comment-id:2961277787 --> @suurt8ll commented on GitHub (Jun 11, 2025): Wow I did not know about `Filter.toggle`. Thanks!
Author
Owner

@jrkropp commented on GitHub (Jun 11, 2025):

Wow I did not know about Filter.toggle. Thanks!

No problem. I've actually been silently following your gemini manifold github for some time now. Inspired me to make my own but for OpenAI Responses API. Learned a lot by reading your function/docs.

<!-- gh-comment-id:2961312100 --> @jrkropp commented on GitHub (Jun 11, 2025): > Wow I did not know about `Filter.toggle`. Thanks! No problem. I've actually been silently following your gemini manifold github for some time now. Inspired me to make my own but for OpenAI Responses API. Learned a lot by reading your function/docs.
Author
Owner

@fkrauthan commented on GitHub (Jun 11, 2025):

Ah cool that works. Still would be great if this toggle could be just implemented by default.

<!-- gh-comment-id:2961418757 --> @fkrauthan commented on GitHub (Jun 11, 2025): Ah cool that works. Still would be great if this toggle could be just implemented by default.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#56051