[GH-ISSUE #5486] enh: Functions/Tools & Valves additional gimmicks #133725

Open
opened 2026-05-24 23:05:53 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @damajor on GitHub (Sep 17, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5486

Functions & Tools:

  • add on_valves_updated (like on pipelines, should be only a 2 lines patch)
  • let update Valves from inside the Function/Tool itself (that may be useful for plugins that wants to expose different user valves params based on global valves settings)
  • new icon management for Actions: as there is no way to embed an icon_url compatible with light & dark themes at the same time, please add icon_url_dark (any other alternatives that enable a way to have compatible colored icons on dark & light themes are also welcome)
  • implement decent logging for tools & functions

Valves:

  • add Comboboxes/Listview
  • add Textbox (multilines strings)
  • sliders for numeric values
  • Static text (single line like title, and another for multiline text for long descriptions)
  • allow user valves to be pinned, so each time we open user valves the same settings are displayed first
Originally created by @damajor on GitHub (Sep 17, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5486 **Functions & Tools:** - add `on_valves_updated` (like on pipelines, should be only a 2 lines patch) - let update Valves from inside the Function/Tool itself (that may be useful for plugins that wants to expose different user valves params based on global valves settings) - new icon management for Actions: as there is no way to embed an `icon_url` compatible with light & dark themes at the same time, please add `icon_url_dark` (any other alternatives that enable a way to have compatible colored icons on dark & light themes are also welcome) - implement decent logging for tools & functions **Valves:** - add Comboboxes/Listview - add Textbox (multilines strings) - sliders for numeric values - Static text (single line like title, and another for multiline text for long descriptions) - allow user valves to be pinned, so each time we open user valves the same settings are displayed first
GiteaMirror added the enhancementgood first issue labels 2026-05-24 23:05:58 -05:00
Author
Owner

@thiswillbeyourgithub commented on GitHub (Feb 16, 2025):

Additionaly: it would be nice if modifying the valves of a tool made it reload in a way that allows setting the tool description dynamically. My use case was that I'm creating a tool to add anki cards (=spaced repetition flashcard) and the llm needs to know the card text fields to specify when writing its tool call. I finally made it work using a @property setter that calls a function that updates the docstring which, rather confusingly, worked only when my placeholder was in the beginning of the docstring and not when it was in the :param line because of the way the docstring gets parsed. So if updating the param could be done too that would help, as that behavior seems undocumented.

<!-- gh-comment-id:2661523776 --> @thiswillbeyourgithub commented on GitHub (Feb 16, 2025): Additionaly: it would be nice if modifying the valves of a tool made it reload in a way that allows setting the tool description dynamically. My use case was that I'm creating [a tool to add anki cards](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/main/tools/anki_tool.py#L25) (=spaced repetition flashcard) and the llm needs to know the card text fields to specify when writing its tool call. I finally made it work using [a @property setter that calls](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/f353d57b0f83eb35c8efa480abe54e1e7eeaeccf/tools/anki_tool.py#L105) a function that [updates the docstring](https://github.com/thiswillbeyourgithub/openwebui_custom_pipes_filters/blob/f353d57b0f83eb35c8efa480abe54e1e7eeaeccf/tools/anki_tool.py#L25) which, rather confusingly, worked only when my placeholder was in the beginning of the docstring and not when it was in the `:param` line because of the way the docstring gets parsed. So if updating the param could be done too that would help, as that behavior seems undocumented.
Author
Owner

@Rain6435 commented on GitHub (Aug 10, 2025):

Hey, this has been applied as per my PR. Take a look.

<!-- gh-comment-id:3172325667 --> @Rain6435 commented on GitHub (Aug 10, 2025): Hey, this has been applied as per my PR. Take a look.
Author
Owner

@tysoncung commented on GitHub (Dec 12, 2025):

This sounds like a useful feature! I'd be interested in contributing to this. Could you provide more details about the expected behavior and any specific requirements or constraints?

<!-- gh-comment-id:3644880330 --> @tysoncung commented on GitHub (Dec 12, 2025): This sounds like a useful feature! I'd be interested in contributing to this. Could you provide more details about the expected behavior and any specific requirements or constraints?
Author
Owner

@tanmay-devhub commented on GitHub (May 15, 2026):

Can i be assigned to this?

<!-- gh-comment-id:4456397583 --> @tanmay-devhub commented on GitHub (May 15, 2026): Can i be assigned to this?
Author
Owner

@Quantum0uasar commented on GitHub (May 18, 2026):

Hi! I'd love to contribute to this enhancement. The on_valves_updated callback and icon management improvements look like focused, well-scoped tasks. I'm comfortable with Python and have worked with plugin/tool systems before. I could start with the on_valves_updated patch (described as ~2 lines) as a first step. Would it be alright if I take this on?

<!-- gh-comment-id:4482637607 --> @Quantum0uasar commented on GitHub (May 18, 2026): Hi! I'd love to contribute to this enhancement. The `on_valves_updated` callback and icon management improvements look like focused, well-scoped tasks. I'm comfortable with Python and have worked with plugin/tool systems before. I could start with the `on_valves_updated` patch (described as ~2 lines) as a first step. Would it be alright if I take this on?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#133725