Commit Graph
788 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
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 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 6ef26be296 refac 2026-11-06 13:32:56 +09:00
Timothy Jaeryang Baek 6f4c7f8935 refac 2026-11-06 13:23:52 +09:00
Timothy Jaeryang Baek c81aca931d refac 2026-11-06 10:52:18 +09:00
Timothy Jaeryang Baek 404d27a36e refac 2026-11-05 11:41:25 +09:00
Classic298 f30667a06f perf: sending a message in an existing chat loads the chat once instead of twice (#33669)
When a message is sent in an existing chat, the server loaded the full chat, then loaded it again right after to check that the user has write access. The check now reuses the chat it already loaded. Who can write to a chat does not change. The saving grows with chat size and is small for ordinary chats.

Time saved per message, measured on SQLite, best of 3 runs, sizes are the chat as stored in the database, images embedded:

| Chat | Time saved |
| --- | --- |
| 7 MB, text only | 34 ms |
| 49 MB, with images | 204 ms |
2026-11-04 05:38:14 +09:00
Timothy Jaeryang Baek bab66b2c2f refac 2026-11-03 16:31:24 +09:00
Timothy Jaeryang Baek e789513ea6 refac 2026-11-03 16:25:23 +09:00
Timothy Jaeryang Baek ddb43c83ba refac 2026-11-02 12:45:15 +09:00
Timothy Jaeryang Baek 321701c1af refac 2026-11-02 09:52:30 +09:00
Timothy Jaeryang Baek d99ec1c02c refac 2026-11-02 08:48:51 +09:00
Timothy Jaeryang Baek b51e68fbb3 refac 2026-11-02 00:31:46 +09:00
Timothy Jaeryang Baek 3814b7b2f1 refac 2026-10-31 16:50:01 +09:00
Timothy Jaeryang Baek 9d1b4ef362 refac 2026-10-30 16:01:47 +09:00
Timothy Jaeryang Baek 858c1e9665 chore: bump 2026-10-29 17:47:24 +09:00
Classic298 2c64ab5487 fix: chat stops with no answer when an MCP server request fails mid-chat (#33272)
When an MCP tool server could not be reached for a tool call (server restarted, connection reset by a proxy or load balancer, a request timing out), the whole chat was cancelled as if the user had pressed stop, and the log only said "Task was cancelled!". Now only that tool call fails, the model gets the connection error as the tool result and the reply finishes, and the underlying connection error is logged. The MCP SDK cancels whatever task opened the session when a single request fails, so each MCP session now runs in its own task instead of the chat's.

Fixes #33268
2026-10-28 10:19:33 +09:00
Timothy Jaeryang Baek 7b303cf496 refac 2026-10-26 07:24:36 +09:00
Timothy Jaeryang Baek 08bfaa4be6 refac 2026-10-25 15:09:48 +09:00
Classic298 c69e5a73c0 fix: "More Concise" and "Add Details" now revise the reply instead of answering the instruction (#33084)
Choosing Add Details, More Concise, or typing a suggestion under a reply sent the model your original question followed straight by the bare instruction, with the reply itself missing, so it answered the instruction on its own (for example "OK, I'll keep answers shorter") instead of rewriting that reply. The model now receives the reply it is being asked to change, so it returns a shorter, more detailed or altered version of it. Plain Try Again and temporary chats were not affected.

Fixes #33083
2026-10-25 08:07:21 +09:00
Classic298 2cf014c7e9 fix: built-in tool toggles show while their feature is off (#32964)
* fix: built-in tool toggles show while their feature is off

The model editor listed the Memory, Notes, Channels, Notifications, Web Search, Image Generation, Code Interpreter, Automations, Calendar and Sub-agents built-in tools even when the admin had turned that feature off for the whole instance, where those toggles do nothing. Each of them is now hidden while its feature is off, and the choices saved on a model are kept for when it is turned back on. The server now also reports whether sub-agents are on, and saving the Sub-agents settings updates the editor without a reload.

Refs #32830

* refac: name the feature switch map like the rest of the codebase

Uses the same name the model capabilities change uses for its matching map.

* refac: keep each tool's feature switch next to its label

Each built-in tool now carries its feature switch alongside its label and description, so the list is defined in one place.
2026-10-25 07:46:22 +09:00
Classic298 5e62c8997f fix: Terminal capability shows while no terminal server exists (#32966)
* fix: Terminal capability shows while no terminal server exists

The Terminal capability showed in the model editor even when the admin had set up no terminal server and direct integrations were off, which is the default, so it did nothing. It now shows only when an enabled terminal server exists or users can add their own through direct integrations, and the value saved on a model is kept. The server now reports whether any enabled terminal server exists, since the editor itself only sees the servers the current user can access and a model can be shared with other users.

Refs #32830

* fix: hide the default terminal picker when no terminal is available

The model editor still showed the default terminal line when no terminal server or direct integration was available. It now follows the same rule as the Terminal capability.
2026-10-25 05:15:13 +09:00
Classic298 3e9d6cb950 fix: saved direct tool servers still apply after direct integrations is turned off (#32996)
Tool servers and Open Terminal connections a user added in their Integrations settings kept loading and were still used in every chat after the admin turned Direct Integrations off, which only hid the settings tab. They are now ignored while Direct Integrations is off, for admins and users alike, and the server ignores them even when a request still includes them. The saved connections stay in each user's settings and come back as soon as the switch is turned on again.
2026-10-24 06:05:51 +09:00
Classic298 be8f2c0a21 fix: auto-generation settings show while the admin turned them off (#32973)
Settings > Interface offered the title, follow-up and chat tag auto-generation switches even when the admin turned those generations off, so switching them did nothing. Each switch now only shows while its generation is on. The settings for keeping and inserting follow-up prompts stay, because they still apply to follow-ups saved in existing chats. Saved choices are kept and apply again once the admin turns the generation back on.

Refs #32830
2026-10-23 10:50:24 +09:00
Classic298 f6f42b0111 fix: editing a WebP image fails with the built-in image editor (#32902)
Editing a WebP image (an uploaded one, or one generated by a provider that returns WebP) failed in the Docker image. Python only learns the WebP type from a system file the image does not ship, so the picture went to the image provider labelled with no type at all, and providers rejected it. WebP is now registered at startup like the other types Open WebUI already sets, so the provider receives it as image/webp.

Fixes #32899
2026-10-23 04:22:51 +09:00
Classic298 db5b874944 feat: let everyone who can use a model pick its model controls (#32860)
Picking a model control option, such as a Thinking level, needed both the Allow Chat Controls and Allow Chat Params permissions, so admins had to hand out the Advanced Parameters panel just to let people pick a preset. Model control picks now work for anyone with access to the model and are saved per model to their account. Allow Chat Controls still hides the Chat Controls panel and Allow Chat Params still hides the Advanced Parameters panel, in the chat and in personal Settings. Parameters a person saves to their account are no longer filtered by these two permissions, since any chat message could already set any parameter without them.

Fixes #32626
2026-10-22 04:44:53 +09:00
Timothy Jaeryang Baek b4db56ae96 refac 2026-10-16 02:46:20 +04:00
Timothy Jaeryang Baek 7dc91de86c refac 2026-10-15 17:08:00 +04:00
Classic298 fb3d92a6ef feat: record the requested model as its own field in the audit log (#32429)
The audit log only showed which model a request used inside the logged request body, which is cut off at MAX_BODY_LOG_SIZE, so the model went missing whenever a long prompt came before it. Audit entries for chat and completion requests, including the OpenAI, Ollama and Anthropic-compatible endpoints, now carry a model_id field with the model the client asked for, at every AUDIT_LOG_LEVEL and however long the request is. Other requests log it as null.

Fixes #30097
2026-10-15 00:00:19 +04:00
Timothy Jaeryang Baek de446952c2 refac 2026-10-14 23:58:58 +04:00
Timothy Jaeryang Baek 1786d6cdb0 refac 2026-10-13 00:43:00 +04:00
Timothy Jaeryang Baek 04bccecb8e refac 2026-10-12 17:29:04 +04:00
Timothy Jaeryang Baek 93723bd315 refac 2026-10-10 22:39:57 +04:00
Classic298 c94ac152ea fix: browser gets stuck in a reload loop after a server upgrade (#31631)
After a server upgrade, browsers could keep reusing their cached copy of the old app page for days, since it was sent with no caching instructions. That old page points at files the new version no longer has, so the app reloads into the same cached page and loops until a hard refresh. The app page now tells the browser to check for a newer version on every visit, which is a tiny request when nothing changed. Other files are cached as before, and an admin-set CACHE_CONTROL still takes precedence.

Fixes #31630
2026-10-10 12:15:39 -05:00
Classic298 0a50954090 fix: Chat failed notifications are not sent when the provider returns an error status (#32198)
Notification targets subscribed to Chat failed stayed silent when the provider answered a chat with an error status, such as a 500, or could not be reached at all. Those failures show up as an error in the chat, but only a few uncommon failures were announced to the targets. Now these failures notify Chat failed targets too, with the error text and a link to the chat.

Fixes #32003
2026-10-10 20:16:10 +04:00
Classic298 9b3d599c75 fix: user can no longer chat after losing access to model controls they had used (#32194)
A user who had picked an option in a model control (the per-model selector in the chat input, for example High on a Thinking control) could not chat any more once the admin switched off Allow Chat Controls or Allow Chat Params for them. Every message failed with "You cannot change model parameters.", and the user could not clear the saved selection because the selector is hidden for them. When either permission is off, the saved selection is now skipped when sending, so messages go through with the model's default options, and it applies again if the permission comes back.

Fixes #31995
2026-10-10 20:09:31 +04:00
Classic298 641c82df19 fix: automations, timers and sub-agents fail with "Message already exists" (#32177)
Automation runs, timers and sub-agents stopped getting a reply after the shared chats rework: the chat shows an empty answer and the run fails with `409 Message already exists or has an invalid ID.` Each of them creates the empty answer before asking the model, and the backend began refusing to fill an answer that is already in the chat; the server-side API flow in the docs and API calls without a user message broke the same way. Such an empty answer is now filled in again when it belongs to the same user and answers the same message, and API calls without a user message work as before, saving the reply on its own as the docs describe. A firing timer or sub-agent also no longer cancels the chat's other timers that are set to stop when the user writes next. Answers that are already finished, or that belong to another user in a shared chat, are still refused.

Fixes #32066
2026-10-10 20:02:54 +04:00
Timothy Jaeryang Baek ecbbff8afb refac 2026-10-09 10:22:37 +04:00
Timothy Jaeryang Baek 0ffd86967f refac 2026-10-08 23:21:57 +04:00
Timothy Jaeryang Baek 91853205e8 refac 2026-10-08 23:06:53 +04:00
Timothy Jaeryang Baek 6cfd6987e5 refac 2026-10-08 14:58:06 +04:00
Timothy Jaeryang Baek de73bb830a refac 2026-10-08 14:30:07 +04:00
Timothy Jaeryang Baek 639139aa7a refac 2026-10-08 02:11:42 +04:00
Timothy Jaeryang Baek 093bfce2b6 refac 2026-10-07 00:39:16 +04:00
Timothy Jaeryang Baek e9cca320b4 refac 2026-10-06 22:02:23 +04:00
Timothy Jaeryang Baek 106aae70e9 refac 2026-10-06 21:45:10 +04:00
Timothy Jaeryang Baek 398c37c73c refac 2026-10-05 14:35:15 +04:00