mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #21615] [CLOSED] perf: Optimize tools listing to skip content/specs and batch access grants #26163
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/21615
Author: @Classic298
Created: 2/19/2026
Status: ❌ Closed
Base:
dev← Head:perf-tool-list📝 Commits (2)
64c6a99Optimize tools listing to skip content/specs and batch access grants (#164)1bbd664Merge branch 'dev' into perf-tool-list📊 Changes
2 files changed (+93 additions, -13 deletions)
View changed files
📝
backend/open_webui/models/tools.py(+70 -0)📝
backend/open_webui/routers/tools.py(+23 -13)📄 Description
The GET /tools/ and GET /tools/list endpoints were loading full Tool
rows including the content column (entire Python scripts) and specs
JSON for every tool, plus running N+1 queries for access grants
(one per tool). Now:
specs, and valves columns
get_grants_by_resources() method on AccessGrants
instead of per-tool has_access() calls
The full get_tools() method remains for the /export endpoint which
needs complete tool data.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.