Opening a chat loaded the whole conversation a second time to work out how full the model's context is, even with Context Compaction off, which is the default. The server only sends that figure while compaction is on, so with it off every open of a large chat read the conversation twice for nothing. Chats now skip the second read while Context Compaction is off, and nothing changes with it on.
Server time to open a chat with Context Compaction off, fastest of repeated opens:
| Chat size | Postgres before | Postgres after | SQLite before | SQLite after |
|---|---|---|---|---|
| 1 MB | 25 ms | 17 ms | 21 ms | 9 ms |
| 10 MB | 66 ms | 44 ms | 39 ms | 20 ms |
| 50 MB | 337 ms | 184 ms | 119 ms | 71 ms |
| 130 MB | 653 ms | 464 ms | 264 ms | 143 ms |
Fixes#34670
Tool results returned as a JSON object or list were re-indented with two spaces before being handed to the model, so those tool calls paid tokens for whitespace nobody reads. They now go to the model as compact JSON. The tool call panel in the chat still shows them pretty-printed, because it formats the result on its own.
Measured on real Open Terminal responses (o200k tokenizer):
| Tool | Before | After | Saved |
|---|---|---|---|
| list_files | 1013 | 672 | 34% |
| glob_search | 2821 | 2061 | 27% |
| grep_search | 2233 | 1652 | 26% |
| run_command | 649 | 614 | 5% |
| read_file | 3254 | 3245 | 0% |
Fixes#34639
A stopped reply was saved without the token counts the model had already reported for it, so the next message had to estimate the reply's size from its text. That estimate includes the model's thinking, which is often not sent back to the model, so after a long tool-calling run it could come out far larger than the real context and trigger compaction well before the threshold. A stopped reply now keeps the counts reported so far, marked incomplete, so the size check starts from the real number; text the stopped round produced after its last report is not counted, which is far less than what the old estimate added. Stopped replies now also show their token usage and count toward the analytics token totals, still not as complete responses.
Fixes#34626
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
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
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
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
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
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
* 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
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.
* 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
* 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.
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
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