From ddb819da4583a56f3ac63335ba73df28ce7220fa Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 11 Mar 2025 22:04:24 -0700 Subject: [PATCH] fix order of imports --- litellm/llms/base_llm/responses/transformation.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/litellm/llms/base_llm/responses/transformation.py b/litellm/llms/base_llm/responses/transformation.py index bca8e3c7ed..6e27fd7a54 100644 --- a/litellm/llms/base_llm/responses/transformation.py +++ b/litellm/llms/base_llm/responses/transformation.py @@ -14,14 +14,16 @@ from litellm.types.llms.openai import ( from litellm.types.router import GenericLiteLLMParams from litellm.types.utils import ModelInfo -from ..chat.transformation import BaseLLMException - if TYPE_CHECKING: from litellm.litellm_core_utils.litellm_logging import Logging as _LiteLLMLoggingObj + from ..chat.transformation import BaseLLMException as _BaseLLMException + LiteLLMLoggingObj = _LiteLLMLoggingObj + BaseLLMException = _BaseLLMException else: LiteLLMLoggingObj = Any + BaseLLMException = Any class BaseResponsesAPIConfig(ABC): @@ -123,6 +125,8 @@ class BaseResponsesAPIConfig(ABC): def get_error_class( self, error_message: str, status_code: int, headers: Union[dict, httpx.Headers] ) -> BaseLLMException: + from ..chat.transformation import BaseLLMException + raise BaseLLMException( status_code=status_code, message=error_message,