Commit Graph
804 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek bc754ef4ec refac 2026-11-20 22:15:12 +04:00
Timothy Jaeryang Baek a59b4099c6 refac 2026-11-17 23:22:18 +09:00
Timothy Jaeryang Baek c48832a6d4 refac 2026-11-17 22:28:32 +09:00
Timothy Jaeryang Baek c201472cf8 refac 2026-11-17 19:31:57 +09:00
Timothy Jaeryang Baek e1d2722520 refac 2026-11-17 18:48:38 +09:00
Timothy Jaeryang Baek f14dca0eec refac 2026-11-17 00:14:38 +09:00
Timothy Jaeryang Baek 4720ff19e7 refac 2026-11-13 17:36:00 +09:00
Timothy Jaeryang Baek 27f30e4533 refac 2026-11-10 12:24:51 +09:00
Classic298 316fde0941 fix: coding agent chats started with a terminal selected never get a title (#33971)
A chat with a coding agent that was started with a terminal selected kept the default title, even with title generation on and a task model set. The title is now generated once the agent has replied, the same way as for any other model.

Fixes #33970
2026-11-09 03:38:24 -05:00
Timothy Jaeryang Baek 21fc016141 refac 2026-11-08 21:57:07 +09:00
Timothy Jaeryang Baek 9b9bea514d refac 2026-11-08 19:06:43 +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
Timothy Jaeryang Baek 3a4e4fdb45 refac 2026-11-08 12:24:29 +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 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
Timothy Jaeryang Baek 834c47ee02 refac 2026-11-08 01:28:41 +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
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