From 1ee6b7852f8731b612734b05f730272d7fcb1ce1 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 13 Mar 2025 15:33:17 -0700 Subject: [PATCH] fix exception_type --- litellm/litellm_core_utils/exception_mapping_utils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/litellm/litellm_core_utils/exception_mapping_utils.py b/litellm/litellm_core_utils/exception_mapping_utils.py index 7a0cffab7b8..1350df639c0 100644 --- a/litellm/litellm_core_utils/exception_mapping_utils.py +++ b/litellm/litellm_core_utils/exception_mapping_utils.py @@ -121,12 +121,13 @@ def extract_and_raise_litellm_exception( def exception_type( # type: ignore # noqa: PLR0915 - model, + model: Optional[str], original_exception, - custom_llm_provider, - completion_kwargs={}, - extra_kwargs={}, + custom_llm_provider: Optional[str] = None, + completion_kwargs: Optional[dict] = {}, + extra_kwargs: Optional[dict] = {}, ): + """Maps an LLM Provider Exception to OpenAI Exception Format""" if any( isinstance(original_exception, exc_type)