Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test: fix test

Krrish Dholakiaf4fbe75af31c
diff --git a/litellm/tests/test_exceptions.py b/litellm/tests/test_exceptions.py
index 9978f6df3e8..0388e026b9f 100644
--- a/litellm/tests/test_exceptions.py
+++ b/litellm/tests/test_exceptions.py
@@ -914,12 +914,16 @@ async def test_exception_with_headers(sync_mode, provider, model, call_type, str
if provider == "openai":
openai_client = openai.OpenAI(api_key="")
elif provider == "azure":
- openai_client = openai.AzureOpenAI(api_key="", base_url="")
+ openai_client = openai.AzureOpenAI(
+ api_key="", base_url="", api_version=litellm.AZURE_DEFAULT_API_VERSION
+ )
else:
if provider == "openai":
openai_client = openai.AsyncOpenAI(api_key="")
elif provider == "azure":
- openai_client = openai.AsyncAzureOpenAI(api_key="", base_url="")
+ openai_client = openai.AsyncAzureOpenAI(
+ api_key="", base_url="", api_version=litellm.AZURE_DEFAULT_API_VERSION
+ )
data = {"model": model}
data, original_function, mapped_target = _pre_call_utils(