mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix(utils.py): add exception mapping for gemini
This commit is contained in:
parent
65816c4907
commit
002b794727
2 changed files with 3 additions and 1 deletions
|
|
@ -461,6 +461,8 @@ async def test_acompletion_gemini_stream():
|
|||
print(f"completion_response: {complete_response}")
|
||||
if complete_response.strip() == "":
|
||||
raise Exception("Empty response received")
|
||||
except litellm.APIError as e:
|
||||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
|
|
|||
|
|
@ -6797,7 +6797,7 @@ def exception_type(
|
|||
llm_provider="vertex_ai",
|
||||
request=original_exception.request,
|
||||
)
|
||||
elif custom_llm_provider == "palm":
|
||||
elif custom_llm_provider == "palm" or custom_llm_provider == "gemini":
|
||||
if "503 Getting metadata" in error_str:
|
||||
# auth errors look like this
|
||||
# 503 Getting metadata from plugin failed with error: Reauthentication is needed. Please run `gcloud auth application-default login` to reauthenticate.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue