1953 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek c9415a688e refac 2026-10-22 07:40:01 +09:00
Classic298 6367a3cc40 fix: OAuth connections send no token when the user calls the API (#32826)
A model connection with its auth type set to OAuth only forwarded the user's sign-in token for requests coming from the browser. The same user calling the API with their bearer token or an API key sent nothing upstream, so an SSO-protected model server rejected every API call and its models could not be listed or used. These connections now fall back to the user's latest sign-in session the same way tool servers already do.

Fixes #32820
2026-10-22 02:13:50 +09:00
Classic298 21f770fb73 fix: OAuth 2.1 (Static) MCP connections send no client secret to servers like X Ads (#32818)
With OAuth 2.1 (Static), when the authorization server did not accept the client secret as a form field, Open WebUI used whichever auth method the server's metadata listed first. X Ads lists "none" (public client, no secret) first, so the token exchange went out without the configured client secret and X rejected it with "Missing valid authorization header". When the server supports HTTP Basic auth, the secret is now sent that way, no matter which method it lists first.

Fixes #32813
2026-10-21 16:38:34 +09:00
Timothy Jaeryang Baek d5cd7f4907 refac 2026-10-21 09:26:26 +09:00
Classic298 56eca192ab feat: context compaction now runs on chats with few messages that are over the threshold (#32794)
Context compaction summarizes older messages and keeps the most recent ones verbatim, splitting the chat at a user message. It skipped the chat whenever the first follow-up message sat too close to the end to keep the share set in the Retained Messages admin setting. So a fresh chat with one question and one reply carrying a lot of tool output never compacted: the follow-up failed with a context length error, and regenerating or editing that follow-up failed the same way. Now compaction splits at the first follow-up message in that case, keeping fewer messages than Retained Messages asks for, so the chat keeps working. Chats where a split already met that share compact as before, and compaction between tool calls is unchanged.

Fixes #32781
2026-10-21 08:35:13 +09:00
Classic298 217766ed0f fix: MCP list results from FastMCP servers reach the model twice (#32726)
When a tool on a server built with the standalone FastMCP package returned a list, the model got the list twice, once as plain text and once as structured data, so every list result cost two to three times the tokens. That package sends the whole list as a single piece of text, a format Open WebUI did not recognise as a duplicate. The list now reaches the model once, and structured data that the text does not already contain is still passed along.

Fixes #32719
2026-10-21 04:46:02 +09:00
Classic298 794e57cf7e fix: misleading ask_user error when questions are not sent as a list (#32727)
When a model sent the ask_user questions as anything other than a list, for example a JSON-encoded string, the tool answered "ask_user requires 1-3 questions." The model had sent the right number of questions, so it did not understand the error and often repeated the same call in a loop. It now gets a separate error saying the questions must be an array of question objects, and the count error only appears when the count is actually wrong.

Fixes #32662
2026-10-21 03:33:10 +09:00
G30 ab6976b5bf fix: when two tools have a function with the same name, the model can call both (#32670) 2026-10-21 02:25:31 +09:00
G30 fd1e59b25f fix: an array query parameter reaches an OpenAPI tool server as repeated values (#32677) 2026-10-21 02:18:13 +09:00
Timothy Jaeryang Baek 079fb19e75 refac 2026-10-16 18:58:58 +04:00
Timothy Jaeryang Baek 5cf7c03332 refac 2026-10-16 14:35:09 +04:00
Timothy Jaeryang Baek 92e64c1d59 refac 2026-10-16 14:31:39 +04:00
Classic298 51a4d58270 feat: tools come back on their own after all OpenAPI tool servers were unreachable (#32533)
With Redis, if every tool server was unreachable when Open WebUI loaded the tool server list, it cached an empty list and served it forever. The tools stayed missing from chats and the tool list after the servers came back, until a restart, a save in the tool server settings or a manual delete of the cached Redis key. An empty cached list is now only trusted while no OpenAPI tool server is enabled, so the next request that loads tools fetches the servers again, the same way terminal servers already behave. While an enabled server stays unreachable, each such request tries it again and can wait for its timeout.

Fixes #29573
2026-10-16 14:10:33 +04:00
Classic298 3ccea416b4 fix: built-in tools disappear when a model has a custom tools parameter (#32530)
Adding a custom parameter named tools to a model, for example to turn on a provider's native web search, made Open WebUI drop all of its own tools for that model: notes, knowledge, tasks and any tools attached to the model stopped working, and attached files lost their context. Those tools now stay, and the model's custom tools are sent alongside them. API calls that pass their own tools, or an empty list to turn tools off, behave as before.

Fixes #32528
2026-10-16 14:09:32 +04:00
Timothy Jaeryang BaekandClassic298 f5a26f53a0 refac
Co-Authored-By: Classic298 <27028174+Classic298@users.noreply.github.com>
2026-10-16 04:20:53 +04:00
Timothy Jaeryang Baek 597b00a547 refac 2026-10-16 03:17:14 +04:00
Classic298 ae6793dd4f fix: OAuth token refresh ignores the client_secret_basic auth method (#32507)
When Open WebUI authenticates to the OAuth provider with client_secret_basic, either because OAUTH_TOKEN_ENDPOINT_AUTH_METHOD is set to it or because an MCP tool server's OAuth provider only offers that method, sign-in sent the client ID and secret in an HTTP Basic header but the token refresh always put them in the request body. Providers that only accept Basic rejected every refresh with invalid_client, so once the access token expired Open WebUI deleted the user's saved OAuth tokens, and model connections and tool servers set to forward the user's OAuth token stopped working until the user signed in again. The refresh now authenticates the same way sign-in does for client_secret_basic, with the credentials only in the Basic header. Setups using client_secret_post, or leaving the setting unset, still send the credentials in the request body exactly as before.

Fixes #32506
2026-10-16 03:01:35 +04:00
Timothy Jaeryang Baek 0b3812f285 refac 2026-10-15 17:56:56 +04:00
Classic298 f7c8ad012d fix: requests authenticated with the x-api-key header are missing from the audit log (#32443)
With audit logging on, requests that used an API key in the x-api-key header (what Anthropic SDKs send) worked but never showed up in the audit log, because the audit check only looked for a Bearer token or a session cookie. These requests are now logged with the user the key belongs to, and this also covers a custom header set through CUSTOM_API_KEY_HEADER. Failed attempts with a wrong key in that header now appear in the log without a user, just like a wrong Bearer key. A malformed Authorization header with no other credential is no longer logged, since it can never authenticate.
2026-10-15 13:59:03 +04:00
Classic298 5fde0485a5 fix: an approved knowledge or file tool loses its sources (#32439)
With tool approval set to ask, a knowledge or file tool the user approved ran and answered, but no sources were saved on the reply or shown below it. The same call without approval listed them as usual. The sources of an approved call are now saved and shown the same way.

Fixes #32436
2026-10-15 00:28:23 +04:00
Classic298 209b15b963 feat: keep socket.io long polling out of the audit log (#32425)
With websocket support turned off, the browser falls back to HTTP long polling and every poll was written to the audit log as its own entry, flooding it. The same traffic over a websocket was never audited, and AUDIT_EXCLUDED_PATHS only matches API routes, so there was no way to filter it out. Polling requests are now skipped as well, so the audit log looks the same whichever transport is in use.

Fixes #31871
2026-10-15 00:01:10 +04:00
Classic298 bae22752d3 feat: add {{MODEL_ID}} placeholder for custom connection headers (#32426)
Custom headers on connections and tool servers could pass the chat, message, user and task to downstream services, but not which model the request was for. Chat requests can now use {{MODEL_ID}}, which holds the ID of the model handling the request; for a workspace model that is the workspace model's own ID. In a multi-model chat each model's request carries its own ID, so downstream services can route by model or log usage per model.

Fixes #30006
2026-10-15 00:00:41 +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 7b47c3b22c refac 2026-10-14 23:21:22 +04:00
Timothy Jaeryang Baek bcf540a989 refac 2026-10-14 18:35:56 +04:00
Timothy Jaeryang Baek a70e96525d refac 2026-10-14 18:22:33 +04:00
Timothy Jaeryang Baek 323139cdf5 refac 2026-10-14 18:11:14 +04:00
Timothy Jaeryang Baek 97a66ef73e refac 2026-10-14 17:58:03 +04:00
Timothy Jaeryang Baek c314239558 refac 2026-10-14 17:10:08 +04:00
Timothy Jaeryang Baek fe0e725997 refac 2026-10-14 16:57:58 +04:00
Timothy Jaeryang Baek 4c5668696b refac 2026-10-14 13:46:36 +04:00
Classic298 29719c8bfb fix: pipes and tools get None instead of a file list when nothing is attached (#32380)
Pipes and tools received None instead of a list of files on messages without attachments, which does not match the docs and breaks plugins that loop over the files. Pipes and tools now get an empty list in that case.

Fixes #32379
2026-10-14 12:18:55 +04:00
Timothy Jaeryang Baek 5c93b06b07 refac 2026-10-13 22:16:21 +04:00
Classic298 4f9f04ceee fix: MCP OAuth sign-in fails when the provider's sign-in page is behind Cloudflare bot protection (#32364)
Connecting an OAuth 2.1 MCP tool server such as Canva failed with "OAuth client registration is still invalid after re-registration" whenever Cloudflare answered Open WebUI's own server-side check of the provider's sign-in page with a bot challenge. The challenge page repeats the requested address, which contains the redirect URL, so Open WebUI read it as the provider rejecting its registration. Open WebUI now skips its check when it gets a bot challenge, and the browser goes on to the provider's sign-in page as usual. Real provider errors about an unknown client or redirect URL still trigger re-registration as before.

Fixes #32363
2026-10-13 21:45:59 +04:00
G30 5032e834ea fix: a calendar reminder fires again after the event is moved to a new time (#32358) 2026-10-13 20:05:14 +04:00
Timothy Jaeryang Baek 97333a4697 refac 2026-10-13 20:04:28 +04:00
Timothy Jaeryang Baek 7840194631 refac 2026-10-13 19:51:58 +04:00
Timothy Jaeryang Baek 2e8839a5dd refac 2026-10-13 19:40:48 +04:00
Timothy Jaeryang Baek d34f73066d refac 2026-10-13 19:10:21 +04:00
Timothy Jaeryang Baek c7193760ba refac 2026-10-13 18:34:24 +04:00
Timothy Jaeryang Baek a94a2068e2 refac 2026-10-13 18:32:14 +04:00
Timothy Jaeryang Baek 200b951491 refac 2026-10-13 18:31:54 +04:00
Timothy Jaeryang Baek fc1005f09b refac 2026-10-13 18:16:01 +04:00
Timothy Jaeryang Baek be6f0a6656 refac 2026-10-13 17:22:11 +04:00
G30 ad77b62491 fix: import skills from GitHub repos that contain symlinks outside the skill folder (#32313) 2026-10-13 16:48:14 +04:00
G30 1c5f101d0b fix: show follow-up suggestions when the task model adds text around its JSON (#32323) 2026-10-13 16:46:17 +04:00
Timothy Jaeryang Baek 03f5191aca refac 2026-10-13 01:49:55 +04:00
Timothy Jaeryang Baek 1786d6cdb0 refac 2026-10-13 00:43:00 +04:00
Timothy Jaeryang Baek 53a8f131f3 refac 2026-10-13 00:42:34 +04:00