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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(test): add environment cleanup for Vertex AI GPT-OSS tests
Julio Quinteros Procf118671598f
diff --git a/tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/gpt_oss/test_vertex_ai_gpt_oss_transformation.py b/tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/gpt_oss/test_vertex_ai_gpt_oss_transformation.pyindex 34046a00ee8..7e7d16bbc0a 100644--- a/tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/gpt_oss/test_vertex_ai_gpt_oss_transformation.py+++ b/tests/test_litellm/llms/vertex_ai/vertex_ai_partner_models/gpt_oss/test_vertex_ai_gpt_oss_transformation.py@@ -16,6 +16,30 @@ from litellm.llms.vertex_ai.vertex_ai_partner_models.gpt_oss.transformation impo)[email protected](autouse=True)+def clean_vertex_env():+ """Clear Google/Vertex AI environment variables before each test to prevent test isolation issues."""+ saved_env = {}+ env_vars_to_clear = [+ "GOOGLE_APPLICATION_CREDENTIALS",+ "GOOGLE_CLOUD_PROJECT",+ "VERTEXAI_PROJECT",+ "VERTEX_PROJECT",+ "VERTEX_LOCATION",+ "VERTEX_AI_PROJECT",+ ]+ for var in env_vars_to_clear:+ if var in os.environ:+ saved_env[var] = os.environ[var]+ del os.environ[var]++ yield++ # Restore saved environment variables+ for var, value in saved_env.items():+ os.environ[var] = value++class TestVertexAIGPTOSSTransformation:"""Test class for VertexAI GPT-OSS transformation functionality."""