mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #21913] [CLOSED] fix: correct else block indentation in tools_dict handler (middleware.py) #49382
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/21913
Author: @ege-gungordu
Created: 2/27/2026
Status: ❌ Closed
Base:
main← Head:fix/tools-dict-else-indentation📝 Commits (1)
cccd416fix: correct indentation of else block in tools_dict handler📊 Changes
1 file changed (+9 additions, -9 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+9 -9)📄 Description
Summary
elseblock for non-native function calling inprocess_chat_payloadwas indented at the same level asif tools_dict:, incorrectly pairing it with the outer check instead of the innerif function_calling == "native"check.Before (broken):
After (fixed):
Impact
tools_dictwas empty (no tools), where it would be a no-op at best.Test plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.