diff --git a/litellm/types/router.py b/litellm/types/router.py index a3335be2b2b..e8712882ee9 100644 --- a/litellm/types/router.py +++ b/litellm/types/router.py @@ -296,6 +296,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 405ec9a01bf..ac91f12e8b7 100644 --- a/ui/litellm-dashboard/src/lib/http/schema.d.ts +++ b/ui/litellm-dashboard/src/lib/http/schema.d.ts @@ -28448,6 +28448,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; /** Google Maps Grounding Cost Per Query */ @@ -38037,6 +38039,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; /** Google Maps Grounding Cost Per Query */