From db5b8749448c5cb2a1e42f1bd0c01213bc2c31d1 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Wed, 21 Oct 2026 21:44:53 +0200 Subject: [PATCH] feat: let everyone who can use a model pick its model controls (#32860) Picking a model control option, such as a Thinking level, needed both the Allow Chat Controls and Allow Chat Params permissions, so admins had to hand out the Advanced Parameters panel just to let people pick a preset. Model control picks now work for anyone with access to the model and are saved per model to their account. Allow Chat Controls still hides the Chat Controls panel and Allow Chat Params still hides the Advanced Parameters panel, in the chat and in personal Settings. Parameters a person saves to their account are no longer filtered by these two permissions, since any chat message could already set any parameter without them. Fixes #32626 --- backend/open_webui/main.py | 6 ------ backend/open_webui/routers/users.py | 10 ---------- .../components/chat/MessageInput/ModelControls.svelte | 7 ++----- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index ff48b1354f..2bf34df419 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1217,12 +1217,6 @@ async def chat_completion( if not isinstance(model_controls, dict): raise HTTPException(400, 'Model control options must be keyed by model.') model_controls = {} if form_data.get('automation_id') else model_controls - if any(model_controls.values()) and user.role != 'admin': - permissions = await Config.get('user.permissions') - for permission in ('chat.controls', 'chat.params'): - if not await has_permission(user.id, permission, permissions): - model_controls = {} - break if missing_base_model and model_controls.get(model_id): raise HTTPException(400, 'Model control options cannot be applied to the fallback model.') if model_info_params or request_params: diff --git a/backend/open_webui/routers/users.py b/backend/open_webui/routers/users.py index 90a327e3fd..66525f8b9a 100644 --- a/backend/open_webui/routers/users.py +++ b/backend/open_webui/routers/users.py @@ -514,16 +514,6 @@ async def update_user_settings_by_session_user( ): ui_settings.pop('system', None) - if ( - user.role != 'admin' - and 'params' in ui_settings - and ( - not await has_permission(user.id, 'chat.controls', await Config.get('user.permissions'), db=db) - or not await has_permission(user.id, 'chat.params', await Config.get('user.permissions'), db=db) - ) - ): - ui_settings.pop('params', None) - if ( user.role != 'admin' and ui_settings is not None diff --git a/src/lib/components/chat/MessageInput/ModelControls.svelte b/src/lib/components/chat/MessageInput/ModelControls.svelte index c1b03c2f02..4169de1805 100644 --- a/src/lib/components/chat/MessageInput/ModelControls.svelte +++ b/src/lib/components/chat/MessageInput/ModelControls.svelte @@ -1,6 +1,6 @@