mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-11 03:38:02 +00:00
fix: user can no longer chat after losing access to model controls they had used (#32194)
A user who had picked an option in a model control (the per-model selector in the chat input, for example High on a Thinking control) could not chat any more once the admin switched off Allow Chat Controls or Allow Chat Params for them. Every message failed with "You cannot change model parameters.", and the user could not clear the saved selection because the selector is hidden for them. When either permission is off, the saved selection is now skipped when sending, so messages go through with the model's default options, and it applies again if the permission comes back. Fixes #31995
This commit is contained in:
parent
ab15284a47
commit
9b3d599c75
1 changed files with 2 additions and 1 deletions
|
|
@ -1202,7 +1202,8 @@ async def chat_completion(
|
|||
permissions = await Config.get('user.permissions')
|
||||
for permission in ('chat.controls', 'chat.params'):
|
||||
if not await has_permission(user.id, permission, permissions):
|
||||
raise HTTPException(403, 'You cannot change model parameters.')
|
||||
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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue