test: skip anthropic overloaded error

This commit is contained in:
Krrish Dholakia 2024-11-14 11:30:21 +05:30
parent 0c4b28225f
commit 7e05fc846d
2 changed files with 5 additions and 1 deletions

View file

@ -736,6 +736,8 @@ async def test_acompletion_claude_2_stream():
if complete_response.strip() == "":
raise Exception("Empty response received")
print(f"completion_response: {complete_response}")
except litellm.InternalServerError:
pass
except litellm.RateLimitError:
pass
except Exception as e:

View file

@ -144,6 +144,7 @@ def validate_raw_gen_ai_request_openai_streaming(span):
"model",
["anthropic/claude-3-opus-20240229"],
)
@pytest.mark.flaky(retries=6, delay=2)
def test_completion_claude_3_function_call_with_otel(model):
litellm.set_verbose = True
@ -188,7 +189,8 @@ def test_completion_claude_3_function_call_with_otel(model):
)
print("response from LiteLLM", response)
except litellm.InternalServerError:
pass
except Exception as e:
pytest.fail(f"Error occurred: {e}")
finally: