mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-29 08:07:34 -05:00
[PR #22406] [CLOSED] fix: filter out internal tool methods starting with underscore #130320
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22406
Author: @Fu-Jie
Created: 3/8/2026
Status: ❌ Closed
Base:
dev← Head:fix/filter-internal-tool-methods📝 Commits (3)
6f9b698fix: filter out internal tool methods starting with underscoree98b039refactor: consistently filter internal methods and parameters starting with underscore9c44b4erefactor: revert parameter/docstring filtering, focus on method filtering📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
backend/open_webui/utils/tools.py(+2 -2)📄 Description
Pull Request Checklist
_in Tools to prevent exposure to LLM.verify_with_logs.py(details below).Changelog Entry
Description
Currently, the tool extraction logic in
backend/open_webui/utils/tools.pyonly filters out dunder methods (__), causing internal helper/protected methods (starting with a single underscore_) to be exposed as callable Tools to the LLM.This PR updates the filtering to exclude all methods starting with
_, adhering to standard Python conventions.Fixed
_) from being extracted as Tools inbackend/open_webui/utils/tools.py.Additional Information
Verification Logic
The following complete script was used to verify the fix:
Verification Logs
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.