Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

exception_type

Ishaan Jaff7827c275ba33
diff --git a/litellm/litellm_core_utils/exception_mapping_utils.py b/litellm/litellm_core_utils/exception_mapping_utils.py
index 82ba8d2e683..54d87cc42e2 100644
--- a/litellm/litellm_core_utils/exception_mapping_utils.py
+++ b/litellm/litellm_core_utils/exception_mapping_utils.py
@@ -121,11 +121,11 @@ def extract_and_raise_litellm_exception(
def exception_type( # type: ignore # noqa: PLR0915
- model: Optional[str],
+ model,
original_exception,
- custom_llm_provider: Optional[str] = None,
- completion_kwargs: Optional[dict] = {},
- extra_kwargs: Optional[dict] = {},
+ custom_llm_provider,
+ completion_kwargs={},
+ extra_kwargs={},
):
"""Maps an LLM Provider Exception to OpenAI Exception Format"""
if any(