mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-11 10:03:05 -05:00
[PR #24724] refac: mirror native FC code_interpreter authz gates onto legacy XML-tag path #115112
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/24724
Author: @Classic298
Created: 5/14/2026
Status: 🔄 Open
Base:
dev← Head:fix/code-interpreter-legacy-path-authz-parity📝 Commits (1)
add2ab2refac: mirror native FC code_interpreter authz gates onto legacy XML-tag path📊 Changes
1 file changed (+21 additions, -2 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+21 -2)📄 Description
The native function-calling tool resolver in utils/tools.py applies five gates before exposing execute_code as a builtin tool: builtin-category enable, ENABLE_CODE_INTERPRETER global config, model capability, features.code_interpreter request flag, and the per-user features.code_interpreter permission.
The legacy XML-tag detection path in streaming_chat_response_handler applied only the request-flag gate. Brings the legacy path to parity by running the same five-gate check before activating tag detection. Behaviour change is limited to deployments that previously relied on the asymmetry — admins who set ENABLE_CODE_INTERPRETER=False or revoked the per-user permission, on the legacy tool-calling mode, with the client supplying features.code_interpreter=true. Any of those three conditions met now correctly disables tag detection.
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.