From 1f8f1f61bb120e534f6b5b1f7990b8961aa3b436 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 19 Sep 2026 16:59:18 +0200 Subject: [PATCH] fix: tell ask_user models that the first option is shown as Recommended (#30196) The ask_user card badges the first option of every question as "Recommended", but nothing ever told the model that. The model picks whatever order it likes, so the badge really means "listed first" and users act on a recommendation the model never made. The ask_user tool description now states that the first option is labelled Recommended and that the model should list the option it recommends first, so the badge reflects an actual choice. Kept the badge and instructed the model instead of adding a per-option "recommended" flag: the flag would need a schema change, validation in the request normalizer and a frontend change, for the same result in the common case. Dropping the badge was the other option, but it removes a useful affordance rather than fixing it. Verified that the added line reaches the model by running the docstring through the tool-spec builder and checking the generated OpenAI function schema. Fixes #30195 --- backend/open_webui/tools/builtin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/open_webui/tools/builtin.py b/backend/open_webui/tools/builtin.py index f3277e3b8f..36896f9a2e 100644 --- a/backend/open_webui/tools/builtin.py +++ b/backend/open_webui/tools/builtin.py @@ -526,6 +526,7 @@ async def ask_user( Use this when the next step depends on user intent, preference, or a tradeoff that cannot be inferred safely. :param questions: 1-3 question objects, each with id, header, question, and 2-3 options. Each option needs label and description. + List the option you recommend first; the UI labels the first option Recommended. :param allow_other: Whether users may enter a free-form answer instead of choosing one of the options :param timeout_ms: How long the browser should keep the prompt open before cancelling it :return: JSON with status and answers keyed by question id