forked from phoenix/litellm-mirror
fix exception mapping
This commit is contained in:
parent
05285c5844
commit
93fb247b1d
4 changed files with 6 additions and 2 deletions
Binary file not shown.
Binary file not shown.
|
@ -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 ################
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue