open-webui/backend/open_webui
Classic298 f8c0d2fdd6
fix: don't mutate caller's payload when resolving a pipe base model (#26906)
generate_function_chat_completion rewrote form_data['model'] to the base
model id in place. Because that dict is the same object process_chat_response
later re-submits for the post-tool-call continuation, the continuation was
access-checked against the base model instead of the user-facing preset.
For a public preset over a private/unregistered pipe base, a non-admin's
first message succeeded but the continuation after a native tool call was
denied and silently swallowed, aborting the response (admins skip the
user-only check, so they were unaffected).

Operate on a shallow copy of form_data, mirroring the openai/ollama routers
which already substitute the base model on a copy. The continuation now
re-checks the preset the user actually has access to.


Claude-Session: https://claude.ai/code/session_018toPfJW1hMXAhokGaL43Ep

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-10 13:33:24 -05:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal refac 2026-06-29 12:40:20 -05:00
migrations refac 2026-07-01 03:37:35 -05:00
models refac 2026-07-01 03:01:46 -05:00
retrieval fix: Milvus multitenancy scalar index creation on Milvus Lite (#26911) 2026-07-10 13:29:29 -05:00
routers refac 2026-07-09 17:59:17 -05:00
socket refac 2026-06-29 03:58:00 -05:00
static chore: format 2026-06-01 14:10:40 -07:00
storage refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00
tools refac 2026-07-09 17:31:43 -05:00
utils fix: convert SecurityHeadersMiddleware to pure ASGI (#26924) 2026-07-10 13:29:14 -05:00
__init__.py refac 2026-06-17 03:01:11 +02:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py refac 2026-07-09 18:02:37 -05:00
constants.py refac 2026-06-29 05:46:51 -05:00
env.py refac 2026-07-09 17:28:05 -05:00
events.py refac 2026-07-09 17:28:34 -05:00
functions.py fix: don't mutate caller's payload when resolving a pipe base model (#26906) 2026-07-10 13:33:24 -05:00
main.py refac 2026-07-09 17:28:34 -05:00
tasks.py refac: modernize type annotations (PEP 604 / PEP 585) 2026-05-12 17:10:15 +09:00