From df3954ac1e13e8e7123095df85048d9a0cdc5deb Mon Sep 17 00:00:00 2001 From: Huanyi Xie <74809554+xiehuanyi@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:11:30 +0300 Subject: [PATCH] fix(utils): drop unused TYPE_CHECKING import for additional_drop_params The helper is loaded through the lazy getattr path, so the TYPE_CHECKING name was an F401 that blew the strict-rule budget. Co-authored-by: Cursor --- litellm/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index 2e140047782..27c8ba99f67 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -268,7 +268,6 @@ if TYPE_CHECKING: ) from litellm.litellm_core_utils.credential_accessor import CredentialAccessor from litellm.litellm_core_utils.dot_notation_indexing import ( - apply_additional_drop_params, delete_nested_value, is_nested_path, ) @@ -4523,8 +4522,8 @@ def get_optional_params( allowed_openai_params=allowed_openai_params, ) - # Apply additional_drop_params. Bare keys stay top-level only; nested JSONPath - # still deletes at the explicit path. Conversation payload keys are not walked. + # Bare keys stay top-level only. Nested JSONPath still deletes at that path + # (including an explicit messages/input path). Bare drops do not walk payload. if additional_drop_params: apply_additional_drop_params_fn: Final = getattr(sys.modules[__name__], "apply_additional_drop_params") optional_params = apply_additional_drop_params_fn( # rebind-ok: drop returns a new params dict