From aaea99005d05988203c70a71f26c18970d2ed7ce Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 10 Oct 2026 18:11:47 +0200 Subject: [PATCH] fix: messages to a model fail after the admin removes a model control the user had set (#32197) When an admin removed a model control (such as Thinking) after a user had chosen one of its options in the chat input, every message that user sent to that model failed with "the selected option is no longer available" and never reached the model. The control is gone from the chat input, so the user had no way to undo the choice. A choice for a control that no longer exists is now ignored and the message goes through. When only one option of a control is removed, the error stays, because the control is still in the chat input and the user can pick another option there. Fixes #31996 --- backend/open_webui/utils/payload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/utils/payload.py b/backend/open_webui/utils/payload.py index 372c107e0f..50db01021f 100644 --- a/backend/open_webui/utils/payload.py +++ b/backend/open_webui/utils/payload.py @@ -22,7 +22,8 @@ def apply_model_controls(params: dict, controls: dict, model_options: dict) -> d if not isinstance(model_options, dict): raise HTTPException(400, 'Model control options must be an object.') for key, choice in model_options.items(): - if key not in controls or not isinstance(choice, str) or choice not in controls[key]['options']: + # Picks for removed controls are skipped: the user has no menu left to clear them. + if key in controls and (not isinstance(choice, str) or choice not in controls[key]['options']): raise HTTPException(400, f'Model control {key}: the selected option is no longer available.') for key, control in controls.items(): choice = model_options.get(key, control.get('default'))