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]

Skip test_e2e_semantic_filter when OPENAI_API_KEY is not set (#20387)

Krish Dholakia58cc6248ab8b
diff --git a/tests/mcp_tests/test_semantic_tool_filter_e2e.py b/tests/mcp_tests/test_semantic_tool_filter_e2e.py
index 91c072ae8a3..0cb7f221a22 100644
--- a/tests/mcp_tests/test_semantic_tool_filter_e2e.py
+++ b/tests/mcp_tests/test_semantic_tool_filter_e2e.py
@@ -25,6 +25,10 @@ except ImportError:
not SEMANTIC_ROUTER_AVAILABLE,
reason="semantic-router not installed. Install with: pip install 'litellm[semantic-router]'"
)
+ not os.environ.get("OPENAI_API_KEY"),
+ reason="OPENAI_API_KEY not set in environment"
+)
async def test_e2e_semantic_filter():
"""E2E: Load router/filter and verify hook filters tools."""
from litellm import Router