Commit Graph
2056 Commits
Author SHA1 Message Date
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 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
Timothy Jaeryang Baek 3aacd9ffab refac 2026-11-06 13:07:13 +09:00
Timothy Jaeryang Baek 0986adfb15 refac 2026-11-06 12:58:35 +09:00
Timothy Jaeryang Baek 0f3bd0a7ea refac 2026-11-06 12:40:49 +09:00
Timothy Jaeryang Baek 768a83ae78 refac 2026-11-06 11:59:05 +09:00
Timothy Jaeryang Baek 6e8a6c4467 refac 2026-11-06 11:34:51 +09:00
Timothy Jaeryang Baek bd6fc15bee refac 2026-11-06 11:12:04 +09:00
Timothy Jaeryang Baek 8e2ba2937e refac 2026-11-06 10:38:09 +09:00
Timothy Jaeryang Baek 7f3e0d018e refac 2026-11-06 09:02:24 +09:00
Timothy Jaeryang Baek 97f71f6ebb refac 2026-11-06 08:53:00 +09:00
Timothy Jaeryang Baek d878373728 refac 2026-11-06 08:41:30 +09:00
Classic298 c384d8e514 fix: split tool calls leave an extra unfinished tool call in the chat (#33779)
When a model sends several tool calls glued into one (for example GPT-5.4 putting two JSON argument sets in a single call), Open WebUI ran each part but also kept the original call in the message with the broken combined arguments and no result. That showed up as an extra tool call that never gets a result, and it was dropped silently when the chat was sent back to the model. The first part now reuses the original call, so every tool call in the message has exactly one result.

Fixes #33778
2026-11-06 08:19:36 +09:00
Classic298 dd42f4e913 refac: skip background work for accounts that were deactivated meanwhile (#33801)
Follow-up generation after a response and replies to channel mentions are now skipped when the account that triggered them has been deactivated in the meantime.
2026-11-06 07:53:32 +09:00
Classic298 f59552efff perf: stop resending the whole reply on every reasoning chunk with OpenRouter-style providers (#33698)
Providers such as OpenRouter attach reasoning details to every reasoning chunk, and each of those chunks made Open WebUI send the entire reply so far to the browser and, with Redis, rewrite the copy kept for page reloads. The browser never shows these details, so a long reasoning reply moved tens of megabytes for a few kilobytes of text. Those chunks now stream like any other reasoning text, and the details are still saved with the reply and still sent back to the provider on the next request.

Measured against a simulated OpenRouter-style provider streaming 1,500 reasoning chunks:

| | before | after |
|---|---|---|
| Data sent to the browser | 73.6 MB | 0.73 MB |
| Redis writes for the reload copy | 1,504 | 19 |
2026-11-05 22:30:39 +09:00
Classic298 b6d861645b fix: chat stops working with Ollama after a tool call with broken arguments (#33697)
A tool call whose arguments were cut off, rejected before it ran or sent empty made every later message with an Ollama model fail, so the chat stayed stuck until that message was edited or removed. Such calls are now sent to Ollama with empty arguments and the conversation continues.

Fixes #33671
2026-11-05 22:27:27 +09:00
Timothy Jaeryang Baek 8366e28725 refac 2026-11-05 21:59:46 +09:00
Timothy Jaeryang Baek bb89844517 refac 2026-11-05 20:47:26 +09:00
Classic298 5beeb0cc29 fix: every chat message fails on a Redis Cluster deployment (#33766)
With REDIS_CLUSTER enabled, every chat message failed with an error. The Redis connection recently added for terminal connections was used before it had read the cluster's layout. That connection now reads the layout first, so chats work again on a Redis Cluster. Plain Redis and Sentinel setups behave as before.

Fixes #33765
2026-11-05 18:40:11 +09:00
Timothy Jaeryang Baek 393dd6689c refac 2026-11-05 17:32:32 +09:00
Timothy Jaeryang Baek 6b826c7585 refac 2026-11-05 16:54:50 +09:00
Timothy Jaeryang Baek c16b77ba07 refac 2026-11-05 13:57:52 +09:00
Timothy Jaeryang Baek a773323e4a refac 2026-11-05 12:32:27 +09:00
Timothy Jaeryang Baek 457f2edd2d refac 2026-11-05 12:29:50 +09:00
Timothy Jaeryang Baek 69189cbaad refac 2026-11-05 12:01:25 +09:00
Timothy Jaeryang Baek 99f4541e3b refac 2026-11-05 12:00:17 +09:00
Timothy Jaeryang Baek 404d27a36e refac 2026-11-05 11:41:25 +09:00
Classic298andxfscott a7e51207c0 fix: audit log records API keys and tokens in plain text (#33746)
With request auditing turned on, only fields whose name ends in "password" were masked, so API keys and tokens saved in the admin settings (OpenAI and Ollama connections, Jupyter, web search and others) were written to the audit log as they were. A secret cut off by the body size limit also had its beginning logged. Fields whose name ends in password, secret, token, key or authorization are now masked, including lists of keys and values cut off by the size limit.

Co-authored-by: xfscott <229475069+xfscott@users.noreply.github.com>
2026-11-05 07:19:24 +09:00
Classic298 051c357f98 refac: limit nesting depth of model settings (#33759)
Model meta and params are now rejected when they are nested too deeply.
2026-11-05 07:19:09 +09:00
Classic298 9db6251498 perf: large chats open about twice as fast (#33665)
Before a chat is stored or returned, the server checks all of its text for null bytes and invalid characters that the database cannot store. That check converted the whole chat to JSON text and scanned it, which on chats with long histories or pasted images took as long as reading the chat from the database, and blocked every other request on that server process meanwhile. The check now inspects each text value in place and skips the slow scan for plain ASCII values such as base64 images. It flags exactly the same chats as before, except that chats containing the six characters \u0000 as ordinary text (common in code) no longer go through a needless cleanup copy on every load.

Measured on SQLite, best of 5 runs, sizes are the stored chat JSON:

| Chat | Check before | Check after | Opening the chat before | Opening the chat after |
| --- | --- | --- | --- | --- |
| 7 MB, text only | 13 ms | 2 ms | 31 ms | 20 ms |
| 49 MB, with images | 107 ms | 4 ms | 211 ms | 108 ms |
| 209 MB, with images | 456 ms | 15 ms | 890 ms | 444 ms |
2026-11-05 06:44:48 +09:00
Classic298 275e0f40e5 fix: context compaction summary cut off at 1000 tokens (#33726)
Without Task Model Params set, the compaction summary was capped at 1000 tokens. Reasoning models could spend all of that on thinking and return an empty or cut-off summary, which then replaced the chat's context. The summary request now carries no token limit of its own unless Task Model Params sets one, so the provider's normal limits apply.
2026-11-05 06:43:07 +09:00