mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
test(test_amazing_vertex_completion.py): add retries for 'Content has no parts.' error in vertex test
This commit is contained in:
parent
dd7d0a2895
commit
5f99938cb8
3 changed files with 5 additions and 1 deletions
|
|
@ -295,6 +295,7 @@ async def test_vertex_ai_anthropic_async_streaming():
|
|||
def test_vertex_ai():
|
||||
import random
|
||||
|
||||
litellm.num_retries = 3
|
||||
load_vertex_ai_credentials()
|
||||
test_models = (
|
||||
litellm.vertex_chat_models
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ def test_null_role_response():
|
|||
"""
|
||||
import openai
|
||||
|
||||
litellm.success_callback = ["lunary"]
|
||||
|
||||
openai_client = openai.OpenAI()
|
||||
with patch.object(
|
||||
openai_client.chat.completions, "create", side_effect=_openai_mock_response
|
||||
|
|
@ -112,6 +114,8 @@ def test_null_role_response():
|
|||
|
||||
assert response.choices[0].message.role == "assistant"
|
||||
|
||||
assert False
|
||||
|
||||
|
||||
def test_completion_azure_command_r():
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ async def test_router_retries_errors(sync_mode, error_type):
|
|||
- Auth Error -> 0 retries
|
||||
- API Error -> 2 retries
|
||||
"""
|
||||
|
||||
_api_key = (
|
||||
"bad-key" if error_type == "Authorization Error" else os.getenv("AZURE_API_KEY")
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue