mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #22995] [CLOSED] fix: Enabling a tool that requires an auth flow returns to chat window with tool enabled #26967
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22995
Author: @taylorwilsdon
Created: 3/24/2026
Status: ❌ Closed
Base:
dev← Head:fix_tool_enablement📝 Commits (10+)
fe6783cMerge pull request #19030 from open-webui/devfc05e0aMerge pull request #19405 from open-webui/deve3faec6Merge pull request #19416 from open-webui/dev9899293Merge pull request #19448 from open-webui/dev140605eMerge pull request #19462 from open-webui/dev6f1486fMerge pull request #19466 from open-webui/devd95f533Merge pull request #19729 from open-webui/deva7271530.6.43 (#20093)6adde20Merge pull request #20394 from open-webui/devf9b0534Merge pull request #20522 from open-webui/dev📊 Changes
2 files changed (+12 additions, -0 deletions)
View changed files
📝
src/lib/components/chat/Chat.svelte(+9 -0)📝
src/lib/components/chat/MessageInput/IntegrationsMenu.svelte(+3 -0)📄 Description
Pull Request Checklist
devbranch. PRs targetingmainwill be immediately closed.devto ensure no unrelated commits (e.g. frommain) are included. Push updates to the existing PR branch instead of closing and reopening.Changelog Entry
Description
When a user enables an MCP tool requiring OAuth 2.1, the tool ID is persisted to sessionStorage before navigating to the auth provider. On return, initNewChat() picks it up and adds it to selectedToolIds, so the tool is enabled and ready to use.
Added
Changed
When a user enables an MCP tool requiring OAuth 2.1, the tool ID is persisted to sessionStorage before navigating to the auth provider. On return, initNewChat() picks it up and adds it to selectedToolIds, so the tool is enabled and ready to use.
Deprecated
Removed
Fixed
Closes #22994
Security
n/a
Breaking Changes
n/a
Additional Information
One caveat worth noting (not a blocker): resetInput() fire-and-forgets setDefaults(), which can asynchronously overwrite selectedToolIds with model/user defaults after our code runs. In that edge case the tool won't be auto-selected, but it will appear as authenticated in the menu (since (app)/+layout.svelte refetches tools on mount), so the user just needs one click. This only affects users who have explicit model-level or user-level default tool settings configured — the common case works correctly.
Screenshots or Videos
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.