mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
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:
parent
732664508f
commit
df3954ac1e
1 changed files with 2 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue