From 5e7c9e68e67fa58dc88b26cc3a016cbfa4eb6c4a Mon Sep 17 00:00:00 2001 From: user <70670632+stuxf@users.noreply.github.com> Date: Fri, 1 May 2026 01:00:19 -0700 Subject: [PATCH] chore(guardrails): satisfy tool permission typing --- litellm/proxy/guardrails/guardrail_hooks/tool_permission.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/tool_permission.py b/litellm/proxy/guardrails/guardrail_hooks/tool_permission.py index 7b7e70d9fc..37be832d35 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/tool_permission.py +++ b/litellm/proxy/guardrails/guardrail_hooks/tool_permission.py @@ -606,10 +606,10 @@ class ToolPermissionGuardrail(CustomGuardrail): getattr(choice.message, "function_call", None), choice_index ) if legacy_tool_call is not None: - error_result = error_results.get(legacy_tool_call.id) - if error_result is not None: + legacy_error_result = error_results.get(legacy_tool_call.id) + if legacy_error_result is not None: choice.message.function_call = None - error_messages.append(error_result.content) + error_messages.append(legacy_error_result.content) # Add error messages to content if error_messages: