diff --git a/litellm/proxy/_experimental/out/model_hub_table.html b/litellm/proxy/_experimental/out/model_hub_table/index.html
similarity index 100%
rename from litellm/proxy/_experimental/out/model_hub_table.html
rename to litellm/proxy/_experimental/out/model_hub_table/index.html
diff --git a/litellm/proxy/_experimental/out/onboarding.html b/litellm/proxy/_experimental/out/onboarding.html
deleted file mode 100644
index faa9576005..0000000000
--- a/litellm/proxy/_experimental/out/onboarding.html
+++ /dev/null
@@ -1 +0,0 @@
-
LiteLLM Dashboard
\ No newline at end of file
diff --git a/litellm/proxy/health_endpoints/_health_endpoints.py b/litellm/proxy/health_endpoints/_health_endpoints.py
index 7fd0b76297..883bff3185 100644
--- a/litellm/proxy/health_endpoints/_health_endpoints.py
+++ b/litellm/proxy/health_endpoints/_health_endpoints.py
@@ -869,6 +869,10 @@ async def test_model_connection(
None,
description="Parameters for litellm.completion, litellm.embedding for the health check",
),
+ model_info: Dict = fastapi.Body(
+ None,
+ description="Model info for the health check",
+ ),
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
"""
@@ -897,7 +901,30 @@ async def test_model_connection(
Returns:
dict: A dictionary containing the health check result with either success information or error details.
"""
+ from litellm.proxy._types import CommonProxyErrors
+ from litellm.proxy.management_endpoints.model_management_endpoints import (
+ ModelManagementAuthChecks,
+ )
+ from litellm.proxy.proxy_server import premium_user, prisma_client
+ from litellm.types.router import Deployment, LiteLLM_Params
+
try:
+ if prisma_client is None:
+ raise HTTPException(
+ status_code=500,
+ detail={"error": CommonProxyErrors.db_not_connected_error.value},
+ )
+ ## Auth check
+ await ModelManagementAuthChecks.can_user_make_model_call(
+ model_params=Deployment(
+ model_name="test_model",
+ litellm_params=LiteLLM_Params(**litellm_params),
+ model_info=model_info,
+ ),
+ user_api_key_dict=user_api_key_dict,
+ prisma_client=prisma_client,
+ premium_user=premium_user,
+ )
# Include health_check_params if provided
litellm_params = _update_litellm_params_for_health_check(
model_info={},
@@ -925,11 +952,12 @@ async def test_model_connection(
"result": cleaned_result,
}
+ except HTTPException as e:
+ raise e
except Exception as e:
- verbose_proxy_logger.error(
+ verbose_proxy_logger.debug(
f"litellm.proxy.health_endpoints.test_model_connection(): Exception occurred - {str(e)}"
)
- verbose_proxy_logger.debug(traceback.format_exc())
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail={"error": f"Failed to test connection: {str(e)}"},