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]

fix(ci): restore vertex model sets mutated by get_optional_params tests (#45209)

devin-ai-integration[bot]037378ece8fe
diff --git a/tests/unit/test_utils_get_optional_params.py b/tests/unit/test_utils_get_optional_params.py
index 92ce66c6ebe..d9d049191a1 100644
--- a/tests/unit/test_utils_get_optional_params.py
+++ b/tests/unit/test_utils_get_optional_params.py
@@ -312,8 +312,8 @@ def test_azure_ai_mistral_optional_params():
assert "user" not in optional_params
-def test_vertex_ai_llama_3_optional_params():
- litellm.vertex_llama3_models = ["meta/llama3-405b-instruct-maas"]
+def test_vertex_ai_llama_3_optional_params(monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setattr(litellm, "vertex_llama3_models", {"meta/llama3-405b-instruct-maas"})
litellm.drop_params = True
optional_params = get_optional_params(
model="meta/llama3-405b-instruct-maas",
@@ -325,8 +325,8 @@ def test_vertex_ai_llama_3_optional_params():
assert "user" not in optional_params
-def test_vertex_ai_mistral_optional_params():
- litellm.vertex_mistral_models = ["mistral-large@2407"]
+def test_vertex_ai_mistral_optional_params(monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setattr(litellm, "vertex_mistral_models", {"mistral-large@2407"})
litellm.drop_params = True
optional_params = get_optional_params(
model="mistral-large@2407",