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
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
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
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
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
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
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
Sub-agents could only be switched on or off for the whole instance, so once they were on every user could spawn them and an admin had no way to keep the extra model usage to a pilot group. The user permissions now have a Sub-agents switch under Features, both in the default permissions and in each group, next to Memories and working the same way. Users without the permission no longer get the sub-agent tool in their chats, nor the timer tool that is part of the same feature. Admins are not restricted by it, and with sub-agents off in Admin Settings nobody gets them, admins included. The permission is on by default, so existing instances behave as before until an admin turns it off; the default can also be set with the USER_PERMISSIONS_FEATURES_SUBAGENTS environment variable.
Closes#34038
A sub-agent could not see the files of the chat that handed it the task, the files it wrote never showed up in that chat, and its extra machine kept running after it finished. It now works in that chat's machine, the same way it already did on a terminal set to one machine per user.
A tool call the model wrote as compact JSON, as most models do, was sent back to the model with a space added after every comma and colon, in every request after the tool ran. The model now gets its tool call arguments back exactly as it wrote them whenever they were valid JSON, so a model server that caches the model's earlier output can keep using that cache. Arguments that Open WebUI had to repair before the tool could run, such as JSON wrapped in a code block or written with Python-style True and None, still go back in their repaired form.
Fixes#33958