From 23c7f2e7e4f37c82020c5fee23c86985621944be Mon Sep 17 00:00:00 2001 From: LHMQ878 <72402929@cityu-dg.edu.cn> Date: Thu, 6 Aug 2026 19:53:16 +0800 Subject: [PATCH 1/2] fix(proxy): declare drop_params on GenericLiteLLMParams /model/update merges by iterating declared model fields. drop_params lived only on LiteLLMParamsTypedDict, so partial PATCHes silently wiped it from stored litellm_params. Fixes #35842 --- litellm/types/router.py | 2 ++ .../test_drop_params_on_generic_params.py | 18 ++++++++++++++++++ ui/litellm-dashboard/src/lib/http/schema.d.ts | 4 ++++ 3 files changed, 24 insertions(+) create mode 100644 tests/test_litellm/test_drop_params_on_generic_params.py diff --git a/litellm/types/router.py b/litellm/types/router.py index 8b4b547bdcc..7d0b4526393 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -230,6 +230,8 @@ class GenericLiteLLMParams(CredentialLiteLLMParams, CustomPricingLiteLLMParams): ## LOGGING PARAMS ## litellm_trace_id: str | None = None + drop_params: bool | None = None + max_file_size_mb: float | None = None # Proxy-wide default rate limits applied to any API key using this deployment diff --git a/tests/test_litellm/test_drop_params_on_generic_params.py b/tests/test_litellm/test_drop_params_on_generic_params.py new file mode 100644 index 00000000000..b8e38e8ca22 --- /dev/null +++ b/tests/test_litellm/test_drop_params_on_generic_params.py @@ -0,0 +1,18 @@ +"""Regression: drop_params must be a declared GenericLiteLLMParams field.""" + +from litellm.types.router import GenericLiteLLMParams + + +def test_generic_litellm_params_declares_drop_params() -> None: + assert "drop_params" in GenericLiteLLMParams.model_fields + params = GenericLiteLLMParams(drop_params=True) + assert params.drop_params is True + dumped = params.model_dump(exclude_none=True) + assert dumped.get("drop_params") is True + + +def test_partial_generic_params_default_drop_params_to_none() -> None: + patch = GenericLiteLLMParams(api_base="https://example.com") + dumped = patch.model_dump() + assert "drop_params" in dumped + assert dumped["drop_params"] is None diff --git a/ui/litellm-dashboard/src/lib/http/schema.d.ts b/ui/litellm-dashboard/src/lib/http/schema.d.ts index 752572f9863..a3c888bf534 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -26784,6 +26784,8 @@ export interface components { default_api_key_rpm_limit?: number | null; /** Default Api Key Tpm Limit */ default_api_key_tpm_limit?: number | null; + /** Drop Params */ + drop_params?: boolean | null; /** Gcs Bucket Name */ gcs_bucket_name?: string | null; /** Input Cost Per Audio Per Second */ @@ -35388,6 +35390,8 @@ export interface components { default_api_key_rpm_limit?: number | null; /** Default Api Key Tpm Limit */ default_api_key_tpm_limit?: number | null; + /** Drop Params */ + drop_params?: boolean | null; /** Gcs Bucket Name */ gcs_bucket_name?: string | null; /** Input Cost Per Audio Per Second */ From 5ca99803098614bf7d826651c6a397660232e8e2 Mon Sep 17 00:00:00 2001 From: LHMQ878 <72402929@cityu-dg.edu.cn> Date: Thu, 6 Aug 2026 19:59:25 +0800 Subject: [PATCH 2/2] chore: retrigger CI against litellm_internal_staging base