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