fix: temporary chats save sub-agent conversations on the server (#31573)

In a temporary chat, when the model handed a task to a sub-agent, the sub-agent's conversation with the task and its answer was saved on the server, although a temporary chat should leave nothing behind. The model is no longer offered sub-agents in temporary chats.

Fixes #31567
This commit is contained in:
Classic298 authored and GitHub committed 2026-09-30 19:05:21 +04:00
1 parent 3d70d43a1c
commit c488f60e8b
1 file changed
+2 -1
+2 -1
View File
@@ -101,7 +101,7 @@ from open_webui.tools.builtin import (
write_note,
)
from open_webui.utils.access_control import has_access, has_connection_access, has_permission
from open_webui.utils.chat_id import is_saved_chat_id
from open_webui.utils.chat_id import is_saved_chat_id, is_temporary_chat_id
from open_webui.utils.headers import (
bearer_auth_header,
get_custom_headers,
@@ -650,6 +650,7 @@ async def get_builtin_tools(
and config.get('subagents.enable')
and getattr(request.state, 'internal', False) is not True
and getattr(request.state, 'direct', False) is not True
and not is_temporary_chat_id(metadata.get('chat_id'))
):
builtin_functions.extend([delegate_task, timer])