diff --git a/litellm/__pycache__/main.cpython-311.pyc b/litellm/__pycache__/main.cpython-311.pyc index 8a8060b8d..322d57454 100644 Binary files a/litellm/__pycache__/main.cpython-311.pyc and b/litellm/__pycache__/main.cpython-311.pyc differ diff --git a/litellm/__pycache__/utils.cpython-311.pyc b/litellm/__pycache__/utils.cpython-311.pyc index 57a8d8591..bbb8e3fd3 100644 Binary files a/litellm/__pycache__/utils.cpython-311.pyc and b/litellm/__pycache__/utils.cpython-311.pyc differ diff --git a/litellm/utils.py b/litellm/utils.py index 874d91b9f..90f0b7c4c 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -1908,6 +1908,7 @@ def exception_type(model, original_exception, custom_llm_provider): elif custom_llm_provider == "vllm": if hasattr(original_exception, "status_code"): if original_exception.status_code == 0: + exception_mapping_worked = True raise APIConnectionError( message=f"VLLMException - {original_exception.message}", llm_provider="vllm", @@ -1931,7 +1932,10 @@ def exception_type(model, original_exception, custom_llm_provider): ): threading.Thread(target=get_all_keys, args=(e.llm_provider,)).start() # don't let an error with mapping interrupt the user from receiving an error from the llm api calls - raise original_exception + if exception_mapping_worked: + raise e + else: + raise original_exception ####### CRASH REPORTING ################ diff --git a/pyproject.toml b/pyproject.toml index 47eeabbf4..670bb1860 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.566" +version = "0.1.567" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"