From 8b499adba6a294aedd7fe2cde9c7be56d3289f4c Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Fri, 5 Dec 2025 19:31:20 -0800 Subject: [PATCH] Revert "Add license metadata to health/readiness endpoint. (#15997)" This reverts commit d89990e0c5e4ecfbef9c4997c455e6498be3d5f4. --- .../health_endpoints/_health_endpoints.py | 24 ------------------- .../test_basic_proxy_startup.py | 3 +++ 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/litellm/proxy/health_endpoints/_health_endpoints.py b/litellm/proxy/health_endpoints/_health_endpoints.py index 62a2aca05d..79e9838d11 100644 --- a/litellm/proxy/health_endpoints/_health_endpoints.py +++ b/litellm/proxy/health_endpoints/_health_endpoints.py @@ -1048,28 +1048,6 @@ async def health_readiness(): index_info = "index does not exist - error: " + str(e) cache_type = {"type": cache_type, "index_info": index_info} - # build license metadata - try: - from litellm.proxy.proxy_server import _license_check # type: ignore - - license_available: bool = _license_check.is_premium() if _license_check else False - license_expiration: Optional[str] = None - - if getattr(_license_check, "airgapped_license_data", None): - license_expiration = _license_check.airgapped_license_data.get( # type: ignore[arg-type] - "expiration_date" - ) - - license_metadata = { - "license": { - "has_license": license_available, - "expiration_date": license_expiration, - } - } - except Exception: - # fail closed: don't let license check break readiness - license_metadata = {"license": {"has_license": False, "expiration_date": None}} - # check DB if prisma_client is not None: # if db passed in, check if it's connected db_health_status = await _db_health_readiness_check() @@ -1080,7 +1058,6 @@ async def health_readiness(): "litellm_version": version, "success_callbacks": success_callback_names, "use_aiohttp_transport": AsyncHTTPHandler._should_use_aiohttp_transport(), - **license_metadata, **db_health_status, } else: @@ -1091,7 +1068,6 @@ async def health_readiness(): "litellm_version": version, "success_callbacks": success_callback_names, "use_aiohttp_transport": AsyncHTTPHandler._should_use_aiohttp_transport(), - **license_metadata, } except Exception as e: raise HTTPException(status_code=503, detail=f"Service Unhealthy ({str(e)})") diff --git a/tests/basic_proxy_startup_tests/test_basic_proxy_startup.py b/tests/basic_proxy_startup_tests/test_basic_proxy_startup.py index 43250af44e..62dd3297da 100644 --- a/tests/basic_proxy_startup_tests/test_basic_proxy_startup.py +++ b/tests/basic_proxy_startup_tests/test_basic_proxy_startup.py @@ -25,7 +25,10 @@ async def test_health_and_chat_completion(): readiness_response = await response.json() assert readiness_response["status"] == "connected" +<<<<<<< HEAD +======= +>>>>>>> parent of d89990e0c5 (Add license metadata to health/readiness endpoint. (#15997)) # Test liveness endpoint async with session.get("http://0.0.0.0:4000/health/liveness") as response: assert response.status == 200