Commit Graph
5814 Commits
Author SHA1 Message Date
Timothy Jaeryang BaekandClassic298 c1a9306397 refac
Co-Authored-By: Classic298 <27028174+Classic298@users.noreply.github.com>
2026-11-08 19:00:46 +09:00
Classic298 43b8ad5256 perf: load the config and the session check at the same time on page load (#33914)
Every page load fetched the app config, then checked the login session, then fetched the config a second time to pick up the logged-in settings, three requests in a row before the sidebar and chat could start loading. Now the first config request sends the login token, so it already returns the logged-in settings and the second fetch is gone, and the session check runs alongside it. A deleted or deactivated user whose old login was still saved in the browser landed on the "backend not detected" error page on every reload; they now go to the sign-in page.

| Local run, 150 ms added to every request | dev branch | this change |
|---|---|---|
| Requests before the sidebar loads | 3 in a row | 2 in parallel |
| Sidebar requests start at | 1240 ms | 875 ms |
2026-11-08 18:41:44 +09:00
Classic298 87d148e9cb fix: /compact makes the next message larger after a long tool-calling reply (#33912)
Context compaction can already run partway through a long reply that calls many tools. If /compact was used after such a reply, the next message sent the model every tool call and result from that reply again, so the request grew instead of shrinking and could go past the model's context limit. Now the model gets the same shortened history it got before /compact, plus the new summary. Nothing changes in the saved chat or in what the chat shows.

Fixes #33911
2026-11-08 18:38:14 +09:00
Timothy Jaeryang Baek e8c0ad85e5 refac 2026-11-08 18:37:29 +09:00
Timothy Jaeryang Baek 9126f2262c refac 2026-11-08 15:30:13 +09:00
Timothy Jaeryang Baek 2416b1fc0b refac 2026-11-08 15:27:19 +09:00
Timothy Jaeryang Baek 2a0e0100bf refac 2026-11-08 12:56:55 +09:00
Timothy Jaeryang Baek 3a4e4fdb45 refac 2026-11-08 12:24:29 +09:00
Classic298 749dc4dbae feat: optional size limit for chat history tool results (#33695)
* feat: optional size limit for chat history tool results

Reading a long earlier chat through the Chat History tools could return far more text than a model's context window holds, so the next request failed. Admins can now set VIEW_CHAT_MAX_CHARS to cap what is returned. The newest messages are kept, older ones are dropped, and the result says it was cut and how many messages came back. Unset keeps the full chat as before.

Fixes #33608

* feat: set the chat read limit from the admin settings

The limit on how much of an earlier chat a model can read could only be set with an environment variable. It is now a Chat Read Limit field in Admin Settings under General, next to the skill limits. The environment variable still works as the starting value, and the setting saved in the panel takes precedence.

* fix: chat read limit failing on chats with empty or non-text messages

With a chat read limit set, reading an imported chat that held empty or non-text message content ended in an error instead of the chat. Such content is now counted and cut as plain text.
2026-11-08 12:10:18 +09:00
Timothy Jaeryang Baek 07029af63d refac 2026-11-08 12:08:18 +09:00
Timothy Jaeryang Baek f0f4a24afa refac 2026-11-08 11:52:13 +09:00
Classic298 06ff3f9195 fix: a malformed tool call with Tool Search on ends tool use for the rest of the reply (#33872)
With Tool Search on, when the model sent a broken call for a tool Tool Search had not loaded yet (arguments that were not a JSON object, or a list of tool calls that was empty or in the wrong format), Open WebUI handled it like an unfinished model response and the rest of the reply ran without any tools. Now the model gets a tool error back, like it does for an unknown tool name, and can retry with its tools. Only a model response that really was cut off still ends tool use.

Fixes #33871
2026-11-08 10:53:50 +09:00
Classic298 9c9e7f0f09 fix: coding agent reply shows a raw id once its terminal is gone (#33880)
After chatting with a coding agent through an Open Terminal connection, reopening the chat once that terminal was removed, switched off or no longer available to the user showed a long internal id such as agent:<terminal>:opencode:<model> at the top of the reply instead of the agent's name, both on the reply and in the chat overview. The name was only remembered while the chat stayed open, so every reload lost it. The name is now saved with the reply.

Fixes #33879
2026-11-08 10:53:27 +09:00
Classic298 00360d7020 fix: saving a chat's view answers signed-out and pending accounts with "Invalid chat view" (#33885)
Saving a chat's view (the per-chat display state the app stores) looked at the request before it checked who was sending it. A signed-out client or a pending account sending broken data got "Invalid chat view" instead of being refused, unlike everywhere else that needs a signed-in user, and the server read up to 1 MB of data for callers it would turn away anyway. The caller is now checked first, so they get the usual 401 Unauthorized. Signed-in users see no change.

Fixes #33883
2026-11-08 10:47:00 +09:00
Classic298 0af72d59a6 fix: client IP header placeholders send 127.0.0.1 for automations, timers and sub-agents (#33891)
When a connection's custom headers use {{USER_IP}} or {{X_FORWARDED_FOR}}, automation runs, timers, sub-agent runs and the model list fetch at startup filled them with 127.0.0.1. A provider that logs or rate-limits per client address then saw these requests as coming from the Open WebUI host. No client sends these requests, so the header is now sent with an empty value for them. Normal chats still send the real client address.

Fixes #33882
2026-11-08 10:46:39 +09:00
Classic298 639766f7f9 refac: limit the number of search words used for chat search (#33844)
Chat search now uses at most the first 12 distinct words of the query.
2026-11-08 10:43:19 +09:00
Classic298 d2a8374f3a fix: OpenAI image generation with no model set asks GPT image models for base64 output (#33875)
With the OpenAI image engine and the Model field left empty, requests go out for gpt-image-2 but still ask for base64 output, a parameter OpenAI does not support for GPT image models. Typing gpt-image-2 into the Model field already left it out. Whether that parameter is sent now depends on the model the request actually uses, so the empty default and the named model send the same request, and an image edit request that names its own model is handled the same way.

Fixes #33874
2026-11-08 10:43:04 +09:00
Timothy Jaeryang Baek 003299641e refac 2026-11-08 01:44:08 +09:00
Timothy Jaeryang Baek 834c47ee02 refac 2026-11-08 01:28:41 +09:00
G30 e1aa2e30f7 fix: autocompletion no longer fails while typing in a chat with a terminal model (#33857) 2026-11-07 23:07:57 +09:00
Classic298 ac45fc0fcc fix: terminal connection closed before login no longer logs an error (#33863)
When the file panel or terminal view closes its live connection right after opening it, the server logged a full error traceback for a client that was already gone. Such a connection is now dropped quietly. Real authentication failures still close with the same error as before.

Fixes #33850
2026-11-07 23:07:19 +09:00
Classic298 de90e13056 refac: limit open collaborative documents per user (#33864)
The limit on open collaborative documents now applies to all of a user's connections together instead of each connection separately.
2026-11-07 23:07:02 +09:00
Classic298 77959080e3 refac: limit size of version history diffs (#33865)
Diffing two versions of a skill, tool, function or prompt now refuses inputs above 5000 lines per version. All four history diff views share the same check.
2026-11-07 23:06:56 +09:00
Timothy Jaeryang Baek c31cdb4e86 refac 2026-11-07 21:32:04 +09:00
Timothy Jaeryang Baek d4e8493cc5 refac 2026-11-07 20:31:42 +09:00
Timothy Jaeryang Baek 7d4dda2704 refac 2026-11-07 19:50:51 +09:00
G30 def1d048bc chore: remove the Show Files on Terminal Select setting (#33855) 2026-11-07 16:47:42 +09:00
Timothy Jaeryang Baek 99dd6a356b refac 2026-11-07 13:13:27 +09:00
Classic298 d39cb17b97 feat: client IP placeholders for connection custom headers (#33833)
Connection custom headers had no way to tell the upstream provider which client a request came from. Adding {{USER_IP}} and {{X_FORWARDED_FOR}} fills in the client address Open WebUI resolves for the request, for example {"X-Real-IP": "{{USER_IP}}"}. Both are empty when there is no client request, such as automations and background jobs. Headers that don't use them are unaffected.

Fixes #33819
2026-11-07 11:38:59 +09:00
Classic298 184eada9ec fix: require a groups claim on token exchange when group management is on (#33846)
Token exchange now refuses the sign-in with a 403 when group management is on, the user is in at least one group and no groups claim can be read from the provider response or the token, the same way the roles check on that path already does.
2026-11-07 11:32:47 +09:00
Classic298 5fae57b037 fix: new chats with a personal terminal reply only "Working directory is unavailable" (#33814)
A personal terminal, one a user adds in their own Settings > Integrations, is reached by their browser and never by the server. New chats with one got only the error "Working directory is unavailable. Check the terminal connection and path." as their reply, because the server tried to set that terminal's working directory to the folder open in the Files panel itself. The server now does this only for terminals it connects to itself, such as those an admin set up, and the browser keeps setting it for personal terminals as before. Chats with an admin-connected terminal still start in that folder and still show the error when the folder does not exist.

Fixes #33811
2026-11-06 22:38:31 +09:00
Classic298 071770989a fix: files and knowledge bases sent through the API reach the model again (#33815)
API clients that attach a file or knowledge collection in the files field of a chat completion got an answer to the bare question. File Context now defaults to off unless function calling is set to legacy, and API requests that do not come from a chat in the web UI get no tools to open the files either. File Context now defaults to on for those requests, so the file content is used in the answer as before. Chats in the web UI keep letting the model open the files itself.

Fixes #33808
2026-11-06 22:04:32 +09:00
Classic298 14c2cad847 fix: MCP OAuth login is lost when the provider has a temporary outage during token refresh (#33805)
When an MCP tool server uses OAuth and the provider's token endpoint answers with a temporary error (rate limit or 5xx) or cannot be reached while refreshing, the stored session was deleted and the user had to log in again. For providers that rotate refresh tokens that session is the only copy, so one provider blip lost the connection for good. Now these temporary failures leave the session in place and the next call retries, while a refresh the provider actually rejects still removes it.

Fixes #33803
2026-11-06 22:04:22 +09:00
Classic298 842261a4a8 fix: skip the knowledge and skill lists when there is nothing to list (#33812)
With native function calling, the model got a hidden list of the attached knowledge and of the user's skills before every new reply, even when no knowledge was attached and the user had no skills, so every chat spent tokens on two empty lists. A custom pipe function that reads the last message as the user's question got the empty knowledge list instead of the question. Each list is now left out when it is empty, as in 0.13.0.

Fixes #33807
2026-11-06 22:03:50 +09:00
Timothy Jaeryang Baek da9bca0fcb refac 2026-11-06 15:28:09 +09:00
Timothy Jaeryang Baek 7b5a7f4a98 refac 2026-11-06 15:10:49 +09:00
Timothy Jaeryang Baek 4955624d25 refac 2026-11-06 15:03:40 +09:00
Timothy Jaeryang Baek 70e4b9a52f refac 2026-11-06 14:40:46 +09:00
Timothy Jaeryang Baek 6da3e7a5d6 refac 2026-11-06 14:37:15 +09:00
Timothy Jaeryang Baek cd2db536c9 refac 2026-11-06 14:15:09 +09:00
Timothy Jaeryang Baek 99b5f80b55 refac 2026-11-06 13:51:22 +09:00
Timothy Jaeryang Baek 429eeba594 refac 2026-11-06 13:50:38 +09:00
Timothy Jaeryang Baek 18f7633afa refac 2026-11-06 13:40:53 +09:00
Timothy Jaeryang Baek 8eb2cabf49 refac 2026-11-06 13:33:33 +09:00
Timothy Jaeryang Baek 6ef26be296 refac 2026-11-06 13:32:56 +09:00
Timothy Jaeryang Baek a2845c9e6f refac 2026-11-06 13:32:20 +09:00
Timothy Jaeryang Baek e037ad0735 refac 2026-11-06 13:29:44 +09:00
Timothy Jaeryang Baek 003c9e0854 refac 2026-11-06 13:24:49 +09:00
Timothy Jaeryang Baek 6f4c7f8935 refac 2026-11-06 13:23:52 +09:00
Timothy Jaeryang Baek e6ae368f51 refac 2026-11-06 13:17:42 +09:00