From 2403fa93845f0262606bbee2548c2f9044fcdd8c Mon Sep 17 00:00:00 2001 From: libaojiang <2461443384@qq.com> Date: Mon, 12 Oct 2026 23:09:45 +0800 Subject: [PATCH] chore(vertex_ai): drop redundant isinstance after cast in id check basedpyright counts the str isinstance as reportUnnecessaryIsInstance now that the id carries a str cast, and the type gate rejects any growth over the merge-base count. --- litellm/litellm_core_utils/prompt_templates/factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/prompt_templates/factory.py b/litellm/litellm_core_utils/prompt_templates/factory.py index 33e2bf03578..c0ce348dcb0 100644 --- a/litellm/litellm_core_utils/prompt_templates/factory.py +++ b/litellm/litellm_core_utils/prompt_templates/factory.py @@ -1329,7 +1329,7 @@ def get_thought_signature_from_tool(tool: Mapping[str, object]) -> str | None: tool_call_id: Final = cast( # cast-ok: tool IDs come from model responses str, tool.get("id") ) - if tool_call_id and isinstance(tool_call_id, str): + if tool_call_id: _, signature = _decode_tool_call_id_with_signature(tool_call_id) return signature return None