From 759b4e1cf6dc57ae4d716bcff95e45db59b96a54 Mon Sep 17 00:00:00 2001 From: Jack Danger Date: Sun, 18 Oct 2026 09:16:48 +0000 Subject: [PATCH] style: ruff-format the api_base repoint predicate (test-quality) Generated-by: termag --- .../management_endpoints/model_management_endpoints.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/litellm/proxy/management_endpoints/model_management_endpoints.py b/litellm/proxy/management_endpoints/model_management_endpoints.py index 8539a80b8e6..316c38fd930 100644 --- a/litellm/proxy/management_endpoints/model_management_endpoints.py +++ b/litellm/proxy/management_endpoints/model_management_endpoints.py @@ -2299,12 +2299,8 @@ class ModelManagementAuthChecks: repoints_endpoint: Final = incoming_params is not None and not incoming_params.keys().isdisjoint( ("api_base", "base_url") ) - brings_own_key: Final = ( - incoming_params is not None and incoming_params.get("api_key") is not None - ) - server_key_stays: Final = ( - stored.get("api_key") not in (None, "") and not brings_own_key - ) + brings_own_key: Final = incoming_params is not None and incoming_params.get("api_key") is not None + server_key_stays: Final = stored.get("api_key") not in (None, "") and not brings_own_key if repoints_endpoint and server_key_stays: raise ProxyException( message=(