From 6c04b05c14ed278e86fd2a4255e4832c014fafda Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sun, 8 Nov 2026 22:41:24 +0100 Subject: [PATCH] fix: the model loses the labels it wrote for its tool calls when Tool Call Labels is on (#33953) With Tool Call Labels on, the model writes a short running and completed label for each tool call, and the chat shows them. Whenever the conversation was sent back to the model, both while it was still answering and on later messages, its earlier tool calls were missing those labels, so it saw itself leaving out its own labels and could learn to stop writing labels, which makes the chat fall back to plain tool names. The model now sees its earlier tool calls with the labels it wrote, and the chat shows them as before. Fixes #33952 --- backend/open_webui/utils/misc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/open_webui/utils/misc.py b/backend/open_webui/utils/misc.py index 5043cc1cc3..75d104871c 100644 --- a/backend/open_webui/utils/misc.py +++ b/backend/open_webui/utils/misc.py @@ -347,6 +347,8 @@ def get_provider_function(item: dict) -> dict: function = item # Repair only the provider copy; failed calls and their original arguments remain intact. function = dict(function) + if 'original_arguments' in function: + function['arguments'] = function['original_arguments'] if error := prepare_tool_call(function): function['arguments'] = JSONCodec.dumps({'error': error}) return {