mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #18392] feat: Model-Specific Tool Restrictions #34112
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hectorc98 on GitHub (Oct 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/18392
Check Existing Issues
Problem Description
Currently, the
toolIdsfield in model configuration only sets default tools that are pre-enabled when a user selects a model. However, users can still manually enable/disable any available tool through the Integrations menu during a chat session. This creates a challenge for administrators who want to:Current Behavior
toolIdsin Model Editor (Workspace → Models → Edit)toolIdsare enabled by defaultDesired Solution you'd like
Add a model-specific tool restriction capability that allows administrators to control which tools can be used with each model, not just which are enabled by default.
Preferred Implementation:
Add a
restrict_toolsboolean capability to the model configuration (similar to existingvision,file_upload, etc.). When enabled:toolIdsarray can be toggled onUI Changes:
Backend Enforcement:
utils/middleware.pybefore processing chat requestsBackward Compatibility:
restrict_tools: falsemaintains current behaviorAlternatives Considered
Alternatives Considered
1. Tool-level Access Control Only
access_controlon tools to restrict by user/group2. Remove Tools from Workspace
3. Add
allowedToolIdsordisabledToolIdsArray4. Capability-level Restrictions Instead of Tool-level
capabilities.tools: false5. Custom Pipeline/Filter
Additional Context
Real-World Use Cases:
Security Compliance: Organization wants to prevent web search and HTTP tools from being used with models that process PII/confidential data, while allowing them for general-purpose models
Cost Management: Expensive MCP servers should only be available with premium models, not with standard models
Model Limitations: Some smaller/faster models don't support tool calling well and should have tools disabled entirely
Regulatory Requirements: Healthcare/financial organizations need to enforce which external services can be called based on data classification
User Expectations:
Many admins assume that configuring tools in the Model Editor restricts usage to those tools, similar to how capabilities work. The current behavior where it's only a "default" is surprising and reduces trust in the admin interface.
Similar Features:
Open WebUI already has similar restriction patterns:
capabilities.vision: falseprevents image uploads for that modelcapabilities.file_upload: falsedisables file inputs@silentoplayz commented on GitHub (Oct 17, 2025):
Not sure if any of this info is helpful, but this is mostly based on my testing and to hopefully be informative.
If you toggle off

Allow Chat Valvesas a Default Permission in Open WebUI from your superadmin account, users OUTSIDE of any usergroup will no longer see the tools/valves controls for tools in theIntegrationsmenu orValveswithin theChat Controlssidebar.You and other admins of your Open WebUI instance are unaffected by
Default Permissions, so you and other admins will still see the tools/valves controls for tools in theIntegrationsmenu orValveswithin theChat Controlssidebar.If you toggle off
Allow Chat Valvesfor both the Default Permission and a user-group permission with the admin in aforementioned user-group, the admin will still have access to the tools/valves controls for tools in theIntegrationsmenu andValveswithin theChat Controlssidebar, also unaffected by the toggled state of theAllow Chat Valvespermission in the user-group, as theAdminrole bypasses this.Proof:
Default Permissions:
2
Adminaccounts -G30is my superadmin account,Ollamawas promoted toAdminfor the sake of this exampleA new user-group was created for both admins with the
Allow Chat Valvestoggled offThe
OllamaAdmin account still has full access to Chat Valves in this scenarioIf I change the
Ollamauser from anAdminback to aUserrole in the user-group I have it in... I can see tools withValvesaccess in theIntegrationsmenu, but not theValvescollapsible section in the Chat Controls sidebar.Lastly, if I remove the
Ollamauser from the user-group I had it in, then I can no longer see the tools/valves controls for tools in theIntegrationsmenu orValveswithin theChat Controlssidebar, as expected, because theAllow Chat Valvespermission has been toggled off this entire time (This loops us back to where we started from).TL;DR
If “Allow Chat Valves” is off in the global Default Permissions, non-group users simply never see the Valves panel or the per-tool toggles in Integrations; flip the same switch for a user-group and every member of that group inherits the same blindness, but anyone with the Admin role is immune—admins always keep full Valve access no matter how the permission is set at either the default or group level, so the only way an admin can “lose” the controls is by being demoted to a regular user and, at the same time, falling under a group (or the global default) that has the right disabled.