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":
|
elif custom_llm_provider == "vllm":
|
||||||
if hasattr(original_exception, "status_code"):
|
if hasattr(original_exception, "status_code"):
|
||||||
if original_exception.status_code == 0:
|
if original_exception.status_code == 0:
|
||||||
|
exception_mapping_worked = True
|
||||||
raise APIConnectionError(
|
raise APIConnectionError(
|
||||||
message=f"VLLMException - {original_exception.message}",
|
message=f"VLLMException - {original_exception.message}",
|
||||||
llm_provider="vllm",
|
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()
|
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
|
# 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 ################
|
####### CRASH REPORTING ################
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "litellm"
|
name = "litellm"
|
||||||
version = "0.1.566"
|
version = "0.1.567"
|
||||||
description = "Library to easily interface with LLM API providers"
|
description = "Library to easily interface with LLM API providers"
|
||||||
authors = ["BerriAI"]
|
authors = ["BerriAI"]
|
||||||
license = "MIT License"
|
license = "MIT License"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue