Commit Graph
6000 Commits
Author SHA1 Message Date
Classic298 4eefe65bd4 fix: chats fail when an MCP server from Tether is enabled (#34728)
MCP servers added in Tether have IDs with colons, and Open WebUI puts the server ID in front of every MCP tool name it offers to the model. OpenAI-compatible providers only accept letters, digits, underscores and dashes in tool names, so every chat with such a server turned on was rejected with `Invalid 'tools[0].function.name'`. The same happened for MCP servers whose admin-chosen ID has dots or spaces. Characters outside that set are now replaced with underscores, so these tools reach the model and their calls still go to the right MCP server. Names that were already valid are unchanged.

Fixes #34718
2026-11-23 19:15:19 +04:00
Classic298 d3ddbf715c fix: error box stays after Continue Response recovers a failed reply (#34822)
When a reply broke off mid-stream and Continue Response then finished it, the old error stayed under the answer, also after a reload. Continuing now clears the old error as soon as the new attempt starts, on screen and in the saved chat. A continuation that fails again shows and saves its own error, and nothing sent to the model changes.

Fixes #34814
2026-11-23 19:12:45 +04:00
Classic298 9475106560 fix: reply after tools stop can come back empty with some models (#34759)
When a chat hits the tool call limit, or tool use stops because the same call keeps failing or a reply is cut off in the middle of a call, Open WebUI asks the model for one last answer. The instruction to stop and answer was merged into the system prompt at the very top of the conversation, so some models (Gemma 4 on vLLM, for example) kept trying to call tools and returned an empty reply. It is now sent as the last message, after the tool results, so the model reads it right before answering. The start of that last request also stays identical to the earlier ones, so provider prompt caching keeps working for it.

Fixes #34750
2026-11-23 19:11:54 +04:00
Classic298 639e25ae39 perf: stop downloading tool server and terminal specs on every request without Redis (#34856)
Without Redis, every tool list and every chat message that uses an OpenAPI tool server or a terminal downloaded the specs of all of them again and waited for each one, and an unreachable server added its full 10 second timeout every time. The specs loaded at startup and on saving the settings are now reused, the same way they are with Redis, and importing a config now refreshes them too, with or without Redis. A changed spec, or a server that was down at startup while others loaded, appears after saving the settings or a restart as with Redis, and when every server was down at startup each request still tries them again until one loads. In this test a terminal message still takes about 0.9 seconds because it reads the terminal's working directory and system prompt live on every message.

<table>
<tr><th>Servers answering in 300 ms</th><th>Before</th><th>After</th></tr>
<tr><td>Tool list (median of 10)</td><td>312 ms, 10 spec downloads</td><td>11 ms, 0</td></tr>
<tr><td>Chat message with a tool server</td><td>323 ms</td><td>33 ms</td></tr>
<tr><td>Tool list with one tool server unreachable</td><td>10988 ms</td><td>16 ms</td></tr>
<tr><td>Chat message with a terminal (median of 10)</td><td>1842 ms</td><td>934 ms</td></tr>
<tr><td>Chat message with a terminal while another is unreachable</td><td>11961 ms</td><td>932 ms</td></tr>
</table>

Fixes #34855
2026-11-23 19:03:06 +04:00
Classic298 4abf416f96 perf: sidebar folder list no longer reads every attached file in full (#34862)
For regular users, opening the app read every file attached to their folders in full, extracted text included, one by one, only to confirm they could still see it. Files the user uploaded themselves are now confirmed with one small lookup per folder. Files shared by others still get the full access check, so files the user lost access to are still removed from the folder as before. The list and what each folder shows are unchanged.

<table>
<tr><th>30 folders x 8 files of 300 KB, SQLite</th><th>Before</th><th>After</th></tr>
<tr><td>Folder list, typical load</td><td>335 ms</td><td>44-61 ms</td></tr>
<tr><td>Database queries per load</td><td>268</td><td>59</td></tr>
</table>

Fixes #34861
2026-11-23 18:40:20 +04:00
Classic298 2cfccb1cef fix: users see the default image for a router model shared with them (#34796)
A router model with its own profile image showed the default logo to every user it was shared with or made public for, and only admins saw the uploaded image. The image now follows the same access as the router model itself, so anyone who can see and chat with it in the model selector also sees its image, and users it is not shared with still get the default logo.

Fixes #34793
2026-11-23 18:40:04 +04:00
Timothy Jaeryang Baek c11a16f448 refac 2026-11-23 18:38:47 +04:00
Timothy Jaeryang Baek 1581377b69 refac 2026-11-23 18:38:06 +04:00
Timothy Jaeryang Baek b7ce1bd194 refac 2026-11-23 18:35:34 +04:00
Classic298 e1e61c48a8 fix: admins get "Model not found" from router models without access settings when the admin bypass is off (#34791)
With BYPASS_ADMIN_ACCESS_CONTROL=false, router models that never got access settings showed up in the admin's model selector, but every chat with them failed with "Model not found". This hit router models set through the ROUTER_MODELS env var or saved through the router models API without access settings, and arena models set through EVALUATION_ARENA_MODELS once the upgrade turns them into router models. Admins can now chat with them, the same way env-set arena models worked before. Regular users still cannot see or use them.

Fixes #34786
2026-11-23 18:34:38 +04:00
Classic298 bdebc44c6e fix: knowledge base loses PDF pages when files are added in a batch (#34886)
Adding already processed files to a knowledge base through the batch add API gave the knowledge base a fresh split of each file's plain text. The chunks lost the page they came from and could run across pages, so citations showed no page and RAG_SOURCE_METADATA_KEYS had nothing to pass to the model. The batch add now copies each file's existing chunks and falls back to the file's text when those chunks are missing. The duplicate content check is unchanged.

Fixes #34876
2026-11-23 18:33:12 +04:00
Timothy Jaeryang Baek 74fad78f1c refac 2026-11-23 18:23:07 +04:00
Classic298 7ea337921f fix: router model chats get titles, tags and follow-ups from a model the router did not pick (#34895)
With no task model set, the title, tags and follow-ups of a router model chat went through the router again, which matched its rules against the built-in task instructions instead of the conversation. They could come from a model unrelated to the chat, and each one could cost another Decisions API call. They now run on the model the router picked for the reply, as in a direct chat with that model, make no routing call of their own and use the Local or External Task Model by that model's connection. A new router chat is titled once its message is prepared, so a stop or failure before the reply starts can leave it untitled. This covers the automatic tasks after a chat message, and voice chat and manual title generation follow separately.

Fixes #34887
2026-11-23 18:10:11 +04:00
Timothy Jaeryang Baek 464e83e414 refac 2026-11-23 16:21:00 +04:00
Timothy Jaeryang Baek 5697a0939a refac 2026-11-23 16:10:09 +04:00
Timothy Jaeryang Baek c3747e8449 refac 2026-11-23 15:06:29 +04:00
Timothy Jaeryang Baek 8e548c0f77 refac 2026-11-23 14:20:59 +04:00
Timothy Jaeryang Baek c1f3b6fd1e refac 2026-11-23 03:29:58 +04:00
Timothy Jaeryang Baek cc2e033b04 refac 2026-11-23 02:26:51 +04:00
Timothy Jaeryang Baek 9b6241e541 refac 2026-11-23 02:05:05 +04:00
Timothy Jaeryang Baek e5b098c681 refac 2026-11-22 23:44:38 +04:00
Timothy Jaeryang Baek a78a9663b6 refac 2026-11-22 22:45:57 +04:00
Timothy Jaeryang Baek 53d741157b refac 2026-11-22 22:20:19 +04:00
Classic298 69fe857c5d fix: Qdrant gRPC mode ignores the http or https scheme of QDRANT_URI (#34783)
With QDRANT_PREFER_GRPC enabled, the http:// or https:// part of QDRANT_URI was ignored and TLS was switched on whenever QDRANT_API_KEY was set. A self-hosted Qdrant on plain HTTP with an API key failed every vector DB call with a TLS handshake error, and an https:// address without a key was connected without TLS. gRPC mode now follows the scheme of QDRANT_URI, the same as REST mode already did. An address without http:// or https:// still uses TLS only when an API key is set.

Fixes #34780
2026-11-22 21:40:50 +04:00
Timothy Jaeryang Baek f62d8efc7c refac 2026-11-22 21:25:13 +04:00
Timothy Jaeryang Baek 657276cf88 refac 2026-11-22 20:47:46 +04:00
Timothy Jaeryang Baek a5058fa562 refac 2026-11-22 20:43:18 +04:00
Timothy Jaeryang Baek 7173e6bd56 refac 2026-11-22 20:33:28 +04:00
Classic298 d065a70483 feat: audit path filters also apply to the OpenAI and Ollama routes (#34665)
AUDIT_EXCLUDED_PATHS and AUDIT_INCLUDED_PATHS only matched paths under /api/ and /api/v1/, so the OpenAI and Ollama routes could not be left out of the audit log, and with an include list set they were never logged. Values are now matched against the path with or without that prefix, so openai or ollama cover those routes.

Part of #33249
2026-11-22 20:29:06 +04:00
Classic298 45f489bea8 fix: chats fail when a Tether OpenAPI tool has the same name as another tool (#34730)
When two tool servers offer a tool with the same name, Open WebUI puts the server ID in front of the second one so the model can tell them apart. Tool servers added in Tether have IDs with colons, so the renamed tool broke the name rules of OpenAI-compatible providers and the provider rejected the whole chat for an invalid tool name. The same happened for admin tool servers whose ID has a dot. Characters outside letters, digits, underscores and dashes are now replaced with underscores in the renamed tool, and calls still reach the right server. Same cause as #34718, which covered MCP servers from Tether.

Fixes #34729
2026-11-22 20:28:37 +04:00
Timothy Jaeryang Baek d711d12aad refac 2026-11-22 19:36:12 +04:00
Timothy Jaeryang Baek b5a9aead84 refac 2026-11-22 17:23:24 +04:00
Timothy Jaeryang Baek df6be8c3a1 refac 2026-11-22 17:13:34 +04:00
Timothy Jaeryang Baek 3f54f781be refac 2026-11-22 16:34:32 +04:00
Timothy Jaeryang Baek 9442dca957 refac 2026-11-22 16:29:29 +04:00
Timothy Jaeryang Baek c8aede457d refac 2026-11-22 16:26:59 +04:00
Timothy Jaeryang Baek 37477fe189 refac 2026-11-22 16:18:52 +04:00
Timothy Jaeryang Baek 4ffe27a9d4 refac 2026-11-22 16:08:38 +04:00
Timothy Jaeryang Baek 67863f310c refac 2026-11-22 15:54:36 +04:00
Timothy Jaeryang Baek e72b31f01f refac 2026-11-22 02:51:42 +04:00
Timothy Jaeryang Baek c7c3ad5e78 refac 2026-11-22 02:24:25 +04:00
Timothy Jaeryang Baek f59a3aff85 refac 2026-11-22 02:10:33 +04:00
Timothy Jaeryang Baek 91344e88f7 refac 2026-11-21 23:58:03 +04:00
Timothy Jaeryang Baek 0ee690e272 refac 2026-11-21 22:27:07 +04:00
Timothy Jaeryang Baek d798367389 refac 2026-11-21 21:41:24 +04:00
Timothy Jaeryang Baek e7406ce2f3 refac 2026-11-21 20:04:01 +04:00
Timothy Jaeryang Baek 61b5a267fc refac 2026-11-21 19:27:11 +04:00
Timothy Jaeryang Baek a8e6e5d777 refac 2026-11-21 19:18:19 +04:00
Timothy Jaeryang Baek 679087e7b3 refac 2026-11-21 18:55:53 +04:00
Timothy Jaeryang Baek 3097ac6666 refac 2026-11-21 18:41:47 +04:00