test: update test to handle model overloaded error

This commit is contained in:
Krrish Dholakia 2024-11-20 22:02:33 +05:30
parent f6ebba7538
commit 361d010068

View file

@ -4490,6 +4490,7 @@ async def test_dynamic_azure_params(stream, sync_mode):
@pytest.mark.flaky(retries=3, delay=1) @pytest.mark.flaky(retries=3, delay=1)
async def test_completion_ai21_chat(): async def test_completion_ai21_chat():
litellm.set_verbose = True litellm.set_verbose = True
try:
response = await litellm.acompletion( response = await litellm.acompletion(
model="jamba-1.5-large", model="jamba-1.5-large",
user="ishaan", user="ishaan",
@ -4503,6 +4504,8 @@ async def test_completion_ai21_chat():
} }
], ],
) )
except litellm.InternalServerError:
pytest.skip("Model is overloaded")
@pytest.mark.parametrize( @pytest.mark.parametrize(