From d1e007415eec3b478df9a05c875d05699df2230c Mon Sep 17 00:00:00 2001 From: shivam Date: Thu, 10 Sep 2026 23:39:21 +0000 Subject: [PATCH] style(proxy): format model management endpoint Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../management_endpoints/model_management_endpoints.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/litellm/proxy/management_endpoints/model_management_endpoints.py b/litellm/proxy/management_endpoints/model_management_endpoints.py index 46756c101cf..b3767d0113a 100644 --- a/litellm/proxy/management_endpoints/model_management_endpoints.py +++ b/litellm/proxy/management_endpoints/model_management_endpoints.py @@ -130,9 +130,7 @@ if TYPE_CHECKING: router: Final = APIRouter() CLEARABLE_LITELLM_PARAMS: Final = frozenset({"cache_control_injection_points"}) -NULL_CLEARABLE_LITELLM_PARAMS: Final = frozenset( - (*SPECIAL_MODEL_INFO_PARAMS, *CLEARABLE_LITELLM_PARAMS) -) +NULL_CLEARABLE_LITELLM_PARAMS: Final = frozenset((*SPECIAL_MODEL_INFO_PARAMS, *CLEARABLE_LITELLM_PARAMS)) async def update_team(*args, **kwargs): @@ -765,10 +763,7 @@ def update_db_model(db_model: Deployment, updated_patch: updateDeployment) -> Pr # CLEARABLE_LITELLM_PARAMS lists non-mirrored litellm_params that explicit null may clear. if updated_patch.litellm_params: for field in updated_patch.litellm_params.model_fields_set: - if ( - getattr(updated_patch.litellm_params, field) is None - and field in NULL_CLEARABLE_LITELLM_PARAMS - ): + if getattr(updated_patch.litellm_params, field) is None and field in NULL_CLEARABLE_LITELLM_PARAMS: merged_litellm_params.pop(field, None) merged_model_info.pop(field, None) if updated_patch.model_info: