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 <cursoragent@cursor.com>
This commit is contained in:
Huanyi Xie 2026-08-20 14:11:30 +03:00
parent 732664508f
commit df3954ac1e

View file

@ -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