From 45c13dd466c3afe45e74e2953cd02f73685fd773 Mon Sep 17 00:00:00 2001 From: TobiMayr Date: Tue, 28 Jul 2026 20:22:07 +0100 Subject: [PATCH] fix: type tool_choice param instead of Any to satisfy ANN401 strict-rule budget --- .../litellm_completion_transformation/transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/responses/litellm_completion_transformation/transformation.py b/litellm/responses/litellm_completion_transformation/transformation.py index a5ad86ddfb6..876ee87ade3 100644 --- a/litellm/responses/litellm_completion_transformation/transformation.py +++ b/litellm/responses/litellm_completion_transformation/transformation.py @@ -168,7 +168,7 @@ class LiteLLMCompletionResponsesConfig: @staticmethod def _transform_tool_choice_for_responses_api_response( - tool_choice: Any, + tool_choice: str | dict[str, Any] | None, ) -> str | dict[str, Any] | None: """ Inverse of ``_transform_tool_choice``: normalizes tool_choice into the