fixup: simplify drop_params guard per greptile P2

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) <noreply@anthropic.com>
This commit is contained in:
xr843 2026-05-03 08:10:06 +08:00
parent abf389830a
commit d6af1eaa5b

View file

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