diff --git a/litellm/llms/sagemaker.py b/litellm/llms/sagemaker.py index 36324286b3..96d06bc20d 100644 --- a/litellm/llms/sagemaker.py +++ b/litellm/llms/sagemaker.py @@ -5,7 +5,7 @@ import requests import time from typing import Callable, Optional import litellm -from litellm.utils import ModelResponse, get_secret, Usage +from litellm.utils import ModelResponse, EmbeddingResponse, get_secret, Usage import sys from copy import deepcopy import httpx @@ -198,7 +198,7 @@ def completion( def embedding(model: str, input: list, - model_response: ModelResponse, + model_response: EmbeddingResponse, print_verbose: Callable, encoding, logging_obj, @@ -262,7 +262,7 @@ def embedding(model: str, ContentType="application/json", Body={data}, CustomAttributes="accept_eula=true", - )""" + )""" # type: ignore logging_obj.pre_call( input=input, api_key="", diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 4747866691..23b39415d6 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -1175,6 +1175,11 @@ async def test_endpoint(request: Request): async def health_endpoint(request: Request, model: Optional[str] = fastapi.Query(None, description="Specify the model name (optional)")): global llm_model_list + if llm_model_list is None: + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail={"error": "Model list not initialized"}, + ) healthy_endpoints, unhealthy_endpoints = await perform_health_check(llm_model_list, model) return {