Filters can now define toggle_options and toggle_default class attributes to show a dropdown selector inside their toggle button area in the chat IntegrationsMenu
When a filter with options is toggled ON, a dropdown appears below it; toggling OFF hides it
The selected dropdown value is passed end-to-end to the filter's inlet/outlet/stream handler via a new selected_option parameter
Filter definition (Python):
class Filter:
toggle = True
toggle_options = ["low", "medium", "high"]
toggle_default = "medium"
async def inlet(self, body, __selected_option__=None):
# __selected_option__ is "low", "medium", or "high"
return body
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
Note
Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/21852
**Author:** [@Classic298](https://github.com/Classic298)
**Created:** 2/25/2026
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `filter-dropdown`
---
### 📝 Commits (3)
- [`8621455`](https://github.com/open-webui/open-webui/commit/86214555d5cc810cc31ab243e23a758ee73bd90a) feat: add dropdown toggle to filter buttons in chat (#167)
- [`b649843`](https://github.com/open-webui/open-webui/commit/b649843b293995d8039bd4a0eb899e3854b68b3d) Merge branch 'dev' into filter-dropdown
- [`3711eaa`](https://github.com/open-webui/open-webui/commit/3711eaa7994c23973246e477bf23c33d379aa3bb) Merge branch 'dev' into filter-dropdown
### 📊 Changes
**7 files changed** (+178 additions, -73 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/main.py` (+1 -0)
📝 `backend/open_webui/utils/chat.py` (+1 -0)
📝 `backend/open_webui/utils/filter.py` (+7 -0)
📝 `backend/open_webui/utils/models.py` (+16 -11)
📝 `src/lib/components/chat/Chat.svelte` (+39 -1)
📝 `src/lib/components/chat/MessageInput.svelte` (+4 -0)
📝 `src/lib/components/chat/MessageInput/IntegrationsMenu.svelte` (+110 -61)
</details>
### 📄 Description
Discussed: https://github.com/open-webui/open-webui/discussions/21849
- Filters can now define toggle_options and toggle_default class attributes to show a dropdown selector inside their toggle button area in the chat IntegrationsMenu
- When a filter with options is toggled ON, a dropdown appears below it; toggling OFF hides it
- The selected dropdown value is passed end-to-end to the filter's inlet/outlet/stream handler via a new __selected_option__ parameter
Filter definition (Python):
```
class Filter:
toggle = True
toggle_options = ["low", "medium", "high"]
toggle_default = "medium"
async def inlet(self, body, __selected_option__=None):
# __selected_option__ is "low", "medium", or "high"
return body
```
Label/value pairs are also supported:
```
toggle_options = [
{"value": "gpt-4", "label": "GPT-4"},
{"value": "gpt-3.5", "label": "GPT-3.5"}
]
```
### Contributor License Agreement
<!--
🚨 DO NOT DELETE THE TEXT BELOW 🚨
Keep the "Contributor License Agreement" confirmation text intact.
Deleting it will trigger the CLA-Bot to INVALIDATE your PR.
-->
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
> [!NOTE]
> Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21852
Author: @Classic298
Created: 2/25/2026
Status: ❌ Closed
Base:
dev← Head:filter-dropdown📝 Commits (3)
8621455feat: add dropdown toggle to filter buttons in chat (#167)b649843Merge branch 'dev' into filter-dropdown3711eaaMerge branch 'dev' into filter-dropdown📊 Changes
7 files changed (+178 additions, -73 deletions)
View changed files
📝
backend/open_webui/main.py(+1 -0)📝
backend/open_webui/utils/chat.py(+1 -0)📝
backend/open_webui/utils/filter.py(+7 -0)📝
backend/open_webui/utils/models.py(+16 -11)📝
src/lib/components/chat/Chat.svelte(+39 -1)📝
src/lib/components/chat/MessageInput.svelte(+4 -0)📝
src/lib/components/chat/MessageInput/IntegrationsMenu.svelte(+110 -61)📄 Description
Discussed: https://github.com/open-webui/open-webui/discussions/21849
Filter definition (Python):
Label/value pairs are also supported:
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.