mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #23036] [CLOSED] fix: allow tool calls to continue generation for non-admin users #26986
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/23036
Author: @yang1002378395-cmyk
Created: 3/25/2026
Status: ❌ Closed
Base:
main← Head:fix-tool-access-22851📝 Commits (1)
9571cf6fix: allow tool calls to continue generation for non-admin users📊 Changes
1 file changed (+2 additions, -0 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+2 -0)📄 Description
Problem
Fixes #22851
When a tool call is executed by a non-admin user, the generation stops after the tool result is returned. Admin users are unaffected.
Root Cause
In
streaming_chat_response_handler, when a tool call completes and the model needs to continue generating the response, the subsequent call togenerate_chat_completionwas missing thebypass_filter=Trueparameter. This caused the model access control check to fail for regular users.Solution
Add
bypass_filter=Trueto bothgenerate_chat_completioncalls after tool execution in the streaming handler:Testing
Files Changed
backend/open_webui/utils/middleware.py: Addedbypass_filter=Trueparameter🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.