From d6af1eaa5b4812a9ef15c5ace170e4bb073643e4 Mon Sep 17 00:00:00 2001 From: xr843 <137012659+xr843@users.noreply.github.com> Date: Sun, 3 May 2026 08:10:06 +0800 Subject: [PATCH] fixup: simplify drop_params guard per greptile P2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the redundant `drop_params is not None and` prefix — `drop_params is True` already implies non-None. Behavior unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) --- litellm/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index 49e7fb3fd8f..55d649f543d 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -3312,9 +3312,7 @@ def get_optional_params_embeddings( # noqa: PLR0915 # Honor drop_params (per-call) and litellm.drop_params (global) the same # way `_check_valid_arg` does above. The raised error message itself # tells users to set `drop_params=True`, so respect it here. - if litellm.drop_params is True or ( - drop_params is not None and drop_params is True - ): + if litellm.drop_params is True or drop_params is True: non_default_params.pop("dimensions", None) else: raise UnsupportedParamsError(