fix use provider specific routing

This commit is contained in:
Ishaan Jaff 2024-08-07 14:37:20 -07:00
parent 25e6733da3
commit 31e4fca748
4 changed files with 35 additions and 15 deletions

View file

@ -119,7 +119,9 @@ async def chat_completion(session, key, model: Union[str, List] = "gpt-4"):
print()
if status != 200:
raise Exception(f"Request did not return a 200 status code: {status}")
raise Exception(
f"Request did not return a 200 status code: {status}, response text={response_text}"
)
response_header_check(
response
@ -485,6 +487,12 @@ async def test_proxy_all_models():
session=session, key=LITELLM_MASTER_KEY, model="groq/llama3-8b-8192"
)
await chat_completion(
session=session,
key=LITELLM_MASTER_KEY,
model="anthropic/claude-3-sonnet-20240229",
)
@pytest.mark.asyncio
async def test_batch_chat_completions():