fix: Use .get() method to access additional_drop_params for MyPy compatibility

Changes litellm_params.additional_drop_params to litellm_params.get("additional_drop_params")
to avoid MyPy error since additional_drop_params is not a defined Pydantic field.

This matches the existing pattern used throughout llm_http_handler.py for accessing
optional fields (e.g., ssl_verify, timeout, etc.).
This commit is contained in:
mzagar 2025-11-17 17:25:54 +01:00 • committed by Sameer Kankute
parent da2aa2ba8d
commit 761798e5c7

View file

@ -1845,7 +1845,7 @@ class BaseLLMHTTPHandler:
)
# Apply additional_drop_params for nested field removal
additional_drop_params = litellm_params.additional_drop_params
additional_drop_params = litellm_params.get("additional_drop_params")
if additional_drop_params:
from litellm.litellm_core_utils.dot_notation_indexing import (
delete_nested_value,