Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

chore(guardrails): satisfy tool permission typing

user5e7c9e68e67f
diff --git a/litellm/proxy/guardrails/guardrail_hooks/tool_permission.py b/litellm/proxy/guardrails/guardrail_hooks/tool_permission.py
index 7b7e70d9fc3..37be832d350 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: