From 761798e5c7b205cda9a1c18fdb42caf40d222595 Mon Sep 17 00:00:00 2001 From: mzagar Date: Mon, 17 Nov 2025 17:25:54 +0100 Subject: [PATCH] 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.). --- litellm/llms/custom_httpx/llm_http_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/custom_httpx/llm_http_handler.py b/litellm/llms/custom_httpx/llm_http_handler.py index a23a26721c9..f4ea50bda4c 100644 --- a/litellm/llms/custom_httpx/llm_http_handler.py +++ b/litellm/llms/custom_httpx/llm_http_handler.py @@ -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,