Commit Graph
2133 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek 720bb54434 refac 2026-11-17 22:01:25 +09:00
Classic298 e7f02d6825 fix: MCP sign-in fails when the server signs its ID token with the client secret (#34593)
Connecting an MCP server over OAuth 2.1 failed with "Algorithm 'HS256' requires 'oct' key" when the server asked for the openid scope and signed the ID token it returned with the client secret, as Readwise does. Open WebUI tried to check that ID token against the server's published keys, which cannot work for this valid signing method, and threw away the access token it had just received. MCP connections only use the access token, so the sign-in no longer checks the ID token and the connection goes through. SSO login is unchanged.

Fixes #34504
2026-11-17 21:54:17 +09:00
Classic298 4360aeee7f perf: model list loads slowly with Redis when models have large profile images (#34595)
With Redis, every large model profile image makes each load of the model list slower, and Redis holds a full copy of every image, even though the list never shows them (the interface fetches each picture separately). Animated or imported profile images are kept at full size and can be several MB each. Open WebUI now leaves profile images out of the model details it keeps for chats, so Redis no longer holds them and the list loads faster. Functions and Tools now get the model without its profile image.

Measured with 50 custom models, one server process. Each number is the middle value of 5 runs of 60 list loads:

| | before | after |
|---|---|---|
| Redis, 4 images (20 MB as stored) | 64 ms | 45 ms |
| Redis, 12 images (57 MB as stored) | 150 ms | 86 ms |
| No Redis, 4 images | 47 ms | 45 ms |
| Redis memory used by the model list, 4 / 12 images | 24 / 71 MB | 35 KB |

Fixes #34594
2026-11-17 21:53:05 +09:00
Classic298 ab73749ca0 fix: SSO session is lost when the provider has a temporary outage during token refresh (#34585)
When the sign-in provider was unreachable, rate limited or answered with a 5xx while Open WebUI refreshed the user's token, the stored login session was deleted. Tools and connections set to use the user's sign-in token then got no token until the user signed out and back in. Now such failures keep the session and the next tool call refreshes again, while a refresh the provider rejects still removes it, matching the earlier fix for MCP connections.

Fixes #34578
2026-11-17 20:33:00 +09:00
Timothy Jaeryang Baek bf8a8dcc7f refac 2026-11-17 20:28:38 +09:00
Timothy Jaeryang Baek 9a5cd68d20 refac 2026-11-17 19:57:45 +09:00
Classic298 00bd84944d fix: log a warning when an OAuth session is deleted (#34583)
Signing in past OAUTH_MAX_SESSIONS_PER_USER prunes a user's oldest stored OAuth sessions, a back-channel logout from the identity provider ends all of them, and connecting an MCP server again replaces the old session for that server. Pruning and the reconnect logged nothing, and the provider logout logged one info line per user without saying which sessions it removed, so an admin could not trace why a user's provider login was gone. Each of these deletions now logs a warning with the user, the session ID and the reason, the same way a failed token refresh already does.

Fixes #34580
2026-11-17 19:32:55 +09:00
Classic298 f3660788ab fix: OAuth session limit drops a device still in use after sign-outs elsewhere (#34586)
Signing out left the browser's stored OAuth session in place, and once a person reached OAUTH_MAX_SESSIONS_PER_USER the next sign-in removed the sessions created first. A device signed in early and still in use lost its session to ones from browsers that had already signed out. Signing out now removes that browser's stored session when the person still has another one for the same provider, and the limit removes the sessions that were signed in or refreshed least recently. A person's only session stays after sign-out, because automations and API key calls keep using it.

Fixes #34581
2026-11-17 19:32:44 +09:00
Timothy Jaeryang Baek c201472cf8 refac 2026-11-17 19:31:57 +09:00
Timothy Jaeryang Baek 3349606652 refac 2026-11-17 19:13:47 +09:00
Timothy Jaeryang Baek e1d2722520 refac 2026-11-17 18:48:38 +09:00
Classic298 139ca26f93 fix: a tool call that runs past the tool server timeout reaches the model as an empty error (#34119)
When a terminal command or a tool server call took longer than the tool server timeout (AIOHTTP_CLIENT_TIMEOUT_TOOL_SERVER), the model got `{"error": ""}` back as the tool result, with nothing saying what went wrong. It now gets `{"error": "TimeoutError"}`, which is also what Open WebUI already reports when reading a tool server's list of tools times out, so the model can tell the user that the call timed out.

Fixes #34096
2026-11-17 01:28:40 +09:00
Classic298 a18774d2b8 fix: MCP servers with a tool list or tool result over 1 MB stop working (#34421)
* fix: MCP servers with a tool list or tool result over 1 MB stop working

Since the MCP library update in 0.12.4, an MCP server that answers with a tool list or a single tool result larger than 1 MB fails with "Failed to connect to MCP server", or the tool call fails. The server answers fine; the library rejects any streamed message over 1 MB, and a server that streams its whole tool list in one message hits that as soon as it offers enough tools. Those messages are accepted again at any size, the way they were before the update and the way plain JSON answers from the same servers already are.

Fixes #34201

* Lift the same limit for MCP servers reached through Tether
2026-11-17 01:26:29 +09:00
Classic298 be7290a09b fix: images attached in an agent chat never reach the agent (#33993)
Attaching an image in a chat with a coding agent model (Claude Code, Codex and the others) dropped the image silently, so the agent only saw the text of the message. The image is now sent to the agent together with the message, as it already is for normal chats. Reported in #33991.
2026-11-17 01:22:54 +09:00
Timothy Jaeryang Baek 7e5c7c02b9 refac 2026-11-17 01:01:23 +09:00
Timothy Jaeryang Baek 6695423f2c fix: chat goes back to an older summary after a compaction during a tool run
Fixes #34140
2026-11-17 01:01:02 +09:00
Timothy Jaeryang Baek 8d7a8dbe54 refac 2026-11-17 00:47:42 +09:00
Timothy Jaeryang Baek b1be6d04e7 refac 2026-11-17 00:40:16 +09:00
Timothy Jaeryang Baek c82ceaf1fc refac 2026-11-17 00:31:18 +09:00
Timothy Jaeryang Baek f14dca0eec refac 2026-11-17 00:14:38 +09:00
Timothy Jaeryang Baek 445db6d0b5 refac 2026-11-16 23:55:22 +09:00
Classic298 75bb64be19 fix: two background sub-agent reports that finish close together split the chat into two branches (#34542)
* fix: two background sub-agent reports that finish close together split the chat into two branches

When a model started two background sub-agents and the second one finished while the reply to the first report was still being written, the second report was attached to the answer that started them. The two reports ended up as separate branches and the chat switched to the second one, hiding the first report and the reply to it. The second report now goes after the reply that is still being written and is answered once that reply ends, so the conversation stays on one branch.

Fixes #34540

* Only treat an unfinished reply as the place for a report while it is still being written
2026-11-16 23:27:31 +09:00
Classic298 3a1a993981 fix: MCP OAuth 2.1 setup fails when the auth server sends very large response headers (#34084)
* fix: MCP OAuth 2.1 setup fails when the auth server sends very large response headers

Adding an MCP server with OAuth 2.1 failed with "Connection error" when its authorization server sent a single response header over 8 KB, which monday.com does with an 11 KB Content-Security-Policy on every OAuth endpoint. Setting up these servers and refreshing their tokens now works, with single headers accepted up to 64 KB.

Fixes #34078

* fix: raise the MCP OAuth header limit only where setup needs it

The check that runs before client registration already moves on when it cannot read a response, so it keeps the default header limit. The larger limit now stays on the requests that broke setup and token refresh.
2026-11-16 22:42:48 +09:00
Classic298 6009a71f24 fix: terminal timeout error names the connection instead of the picked terminal (#34114)
When a message timed out because a terminal's machine was still starting, the error named the Terminals connection the admin set up, a name the user never sees in the Terminal menu. The error now names the terminal the user picked, the same name the Terminal menu shows.

Fixes #34090
2026-11-16 21:12:17 +09:00
Timothy Jaeryang Baek 205c2e97ce refac 2026-11-16 21:10:30 +09:00
Timothy Jaeryang Baek abcebd7d0d refac 2026-11-16 20:02:16 +09:00
Timothy Jaeryang Baek 0e59b66afc refac 2026-11-16 19:43:06 +09:00
Timothy Jaeryang Baek 6afb1681c9 refac 2026-11-16 19:38:00 +09:00
Classic298 956ee485f9 fix: concurrent requests stall for 30 seconds and fail with database session sharing on (#34185)
With DATABASE_ENABLE_SESSION_SHARING on (off by default), the chat lists and the inbox held the request's database connection while they opened a second one for a small extra read. A burst of page loads then took every pooled connection, each request waited for a second connection, and they failed after the 30 second pool timeout with "QueuePool limit ... reached". Those extra reads now run on the request's own connection. In a burst of 80 page loads with a pool of 5, 11 failed on SQLite and 58 on PostgreSQL before this change, and none fail now.

Fixes #34184
2026-11-16 19:15:17 +09:00
Timothy Jaeryang Baek a199370769 refac 2026-11-16 15:16:21 +09:00
Timothy Jaeryang Baek a52c92cc61 refac 2026-11-16 15:14:20 +09:00
Timothy Jaeryang Baek 25d579f947 refac 2026-11-16 15:11:22 +09:00
Timothy Jaeryang Baek f085657a98 refac 2026-11-16 14:41:42 +09:00
Timothy Jaeryang Baek 6f04d48166 refac 2026-11-16 14:21:04 +09:00
Timothy Jaeryang Baek f22671e35a refac 2026-11-16 13:15:49 +09:00
Timothy Jaeryang Baek 694dc9796c refac 2026-11-14 01:15:47 +09:00
Timothy Jaeryang Baek 6378f94a65 refac 2026-11-14 00:45:43 +09:00
Timothy Jaeryang Baek 121bc0ec50 refac 2026-11-14 00:14:28 +09:00
Classic298 80478abea1 fix: assistant messages with only tool calls are sent with an empty string instead of null (#34265)
When an assistant message has tool calls but no text, the OpenAI Chat Completions format uses `content: null`, since content is optional next to tool calls and OpenAI's own API returns null there. Open WebUI sent an empty string in two places: when replaying earlier tool calls from the chat history, and when converting requests from clients that use its Anthropic-compatible endpoint. For Claude models, LiteLLM 1.81.14 through 1.108.x replaces that empty string with "[System: Empty message content sanitised to satisfy protocol]", and the model then repeats that line in its replies (LiteLLM 1.109 and later leave the empty text out instead). These messages now go out with null content, which OpenAI and every provider tested on OpenRouter (Gemini, Claude, DeepSeek, Qwen, Mistral, Llama, Kimi and Grok) accept.

Fixes #34264
2026-11-13 18:26:08 +09:00
Timothy Jaeryang Baek 4720ff19e7 refac 2026-11-13 17:36:00 +09:00
Timothy Jaeryang Baek ebdead036e refac 2026-11-12 22:20:10 +09:00
Timothy Jaeryang Baek c67d774d71 refac 2026-11-12 22:17:23 +09:00
Classic298 7429093191 fix: coding agent models get ids made only of letters, digits, dashes and underscores (#34171)
Cursor and Pi model names carry brackets, equals signs, commas or slashes, and Open WebUI kept those in the ids of their agent models, so a pinned Cursor or Pi model opened a new chat on "Select a model". Agent models now get ids made only of letters, digits, dashes and underscores, with a few extra characters added when the name had to change, so two models never end up with the same id. The agent itself still runs on its own model name. Existing pins, default model choices and automations that point at an agent model whose name had other characters (dots included, as in most Codex models) stop matching and need the model picked again, and an existing chat with such an agent answers "Agent model is unavailable in the selected terminal" until the model is picked again.

Fixes #34168
2026-11-12 22:00:04 +09:00
Classic298 06ba65d50c fix: a coding agent's error shows a technical dump with the whole system prompt (#34173)
When the terminal refused to start a coding agent, for example because the system prompt was longer than Open Terminal accepts, the error under the reply was a technical dump of that refusal with the whole system prompt in it. Such a refusal now shows "Agent environment request failed". Refusals the terminal explains in plain words, such as another reply still running in the chat, keep showing that reason.

Fixes #34172
2026-11-12 21:53:27 +09:00
Classic298 64471947ab fix: a compaction during a tool run drops the earlier conversation summary (#34151)
When a turn started from an existing summary and its reply then compacted again between tool calls, the new summary was written without the earlier one whenever the plain summary prompt was used (a model with a filter, a separate Context Compaction Model, or a provider that refuses the cached replay). From the next turn on, everything the earlier summary held was gone. That compaction now gets the turn's summary as its previous summary, as a compaction at the start of a turn already does.

Fixes #34141
2026-11-12 21:52:18 +09:00
Timothy Jaeryang Baek 44d55bd0f0 refac 2026-11-12 21:49:53 +09:00
Classic298 c557cf58aa fix: background memory review saves memories from temporary chats (#34263)
With the background memory review on, Open WebUI looks back over the chat every few messages (10 by default) to save or update memories, and it did this in temporary chats too. Facts from a temporary chat could end up as memories that stayed after the chat was closed and showed up in later chats. The automatic review now skips temporary chats, so they leave no memories behind unless the user asks for one. Normal chats are reviewed as before, and memories already saved from a temporary chat are not removed.

Fixes #34262
2026-11-12 21:42:03 +09:00
Classic298 d0c7dec838 fix: replies end in a 400 on vLLM when tool use stops (#34176)
When tool use stopped for a reply (the tool call limit, the same call failing twice, or a reply cut off in the middle of a tool call), Open WebUI asks the model once more for a final answer, and that request carried an empty tools list. vLLM refuses that with a 400, so the reply ended in that error instead of an answer. The final answer request now keeps the chat's tools and turns tool calls off with tool choice "none", the standard setting for that. Ollama has no tool choice setting, so for Ollama models any request with tool choice "none" now leaves the tools out, which is the only way to keep the model from calling them.

Fixes #34169
2026-11-12 21:20:49 +09:00
Timothy Jaeryang Baek 2547992b8a refac 2026-11-12 13:39:35 +09:00
Timothy Jaeryang Baek e46920dcc7 refac 2026-11-11 15:34:33 +09:00