From 512df37a9721bfdd9d24058b8537849a40f67eb2 Mon Sep 17 00:00:00 2001 From: ege-arhan Date: Thu, 22 Oct 2026 18:27:37 +0000 Subject: [PATCH] fix(utils): narrow pyright ignore to the flagged line in allowed_tools guard --- litellm/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index f863d7c285e..9b9fb07fb7c 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -9059,7 +9059,7 @@ def validate_chat_completion_tool_choice( tool_choice.get("allowed_tools"), # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # raw dict payload dict, ): - return tool_choice + return tool_choice # pyright: ignore[reportUnknownVariableType] # narrowed raw dict payload # Standard OpenAI format: {"type": "function", "function": {...}} if tool_choice.get("type") is None or tool_choice.get("function") is None: