fix exception mapping error

This commit is contained in:
Krrish Dholakia 2023-09-08 18:20:03 -07:00
parent da87721a20
commit a89a491c10
6 changed files with 4 additions and 4 deletions

View file

@ -43,7 +43,7 @@ def test_context_window(model):
with pytest.raises(ContextWindowExceededError):
completion(model=model, messages=messages)
test_context_window(models[0])
# Test 2: InvalidAuth Errors
@pytest.mark.parametrize("model", models)

View file

@ -1579,7 +1579,7 @@ def exception_type(model, original_exception, custom_llm_provider):
model=model,
llm_provider=original_exception.llm_provider
)
raise ValueError(original_exception)
raise original_exception
elif model:
error_str = str(original_exception)
if isinstance(original_exception, BaseException):
@ -1931,7 +1931,7 @@ 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 ValueError(original_exception)
raise original_exception
####### CRASH REPORTING ################

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "litellm"
version = "0.1.565"
version = "0.1.566"
description = "Library to easily interface with LLM API providers"
authors = ["BerriAI"]
license = "MIT License"