fix(utils.py): guarantee openai-compatible headers always exist in response

Fixes https://github.com/BerriAI/litellm/issues/5957
This commit is contained in:
Krrish Dholakia 2024-09-28 16:57:04 -07:00
parent 498e14ba59
commit 55d7bc7f32
3 changed files with 42 additions and 19 deletions

View file

@ -4547,7 +4547,12 @@ async def test_completion_ai21_chat():
@pytest.mark.parametrize(
"model",
["gpt-4o", "azure/chatgpt-v-2", "claude-3-sonnet-20240229"], #
[
"gpt-4o",
"azure/chatgpt-v-2",
"claude-3-sonnet-20240229",
"fireworks_ai/mixtral-8x7b-instruct",
],
)
@pytest.mark.parametrize(
"stream",