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 @pytest.mark.skip(reason="lakera deprecated their v1 endpoint.")
Ishaan Jaff7dd55ce70cbd
diff --git a/tests/local_testing/test_lakera_ai_prompt_injection.py b/tests/local_testing/test_lakera_ai_prompt_injection.pyindex f9035a74f47..e9704143be6 100644--- a/tests/local_testing/test_lakera_ai_prompt_injection.py+++ b/tests/local_testing/test_lakera_ai_prompt_injection.py@@ -55,6 +55,7 @@ def make_config_map(config: dict):),)@pytest.mark.asyncio[email protected](reason="lakera deprecated their v1 endpoint.")async def test_lakera_prompt_injection_detection():"""Tests to see OpenAI Moderation raises an error for a flagged response@@ -101,6 +102,7 @@ async def test_lakera_prompt_injection_detection():),)@pytest.mark.asyncio[email protected](reason="lakera deprecated their v1 endpoint.")async def test_lakera_safe_prompt():"""Nothing should get raised here@@ -126,6 +128,7 @@ async def test_lakera_safe_prompt():@pytest.mark.asyncio[email protected](reason="lakera deprecated their v1 endpoint.")async def test_moderations_on_embeddings():try:temp_router = litellm.Router(@@ -188,6 +191,7 @@ async def test_moderations_on_embeddings():}),)[email protected](reason="lakera deprecated their v1 endpoint.")async def test_messages_for_disabled_role(spy_post):moderation = lakeraAI_Moderation()data = {@@ -226,6 +230,7 @@ async def test_messages_for_disabled_role(spy_post):),)@patch("litellm.add_function_to_prompt", False)[email protected](reason="lakera deprecated their v1 endpoint.")async def test_system_message_with_function_input(spy_post):moderation = lakeraAI_Moderation()data = {@@ -270,6 +275,7 @@ async def test_system_message_with_function_input(spy_post):),)@patch("litellm.add_function_to_prompt", False)[email protected](reason="lakera deprecated their v1 endpoint.")async def test_multi_message_with_function_input(spy_post):moderation = lakeraAI_Moderation()data = {@@ -317,6 +323,7 @@ async def test_multi_message_with_function_input(spy_post):}),)[email protected](reason="lakera deprecated their v1 endpoint.")async def test_message_ordering(spy_post):moderation = lakeraAI_Moderation()data = {@@ -343,6 +350,7 @@ async def test_message_ordering(spy_post):@pytest.mark.asyncio[email protected](reason="lakera deprecated their v1 endpoint.")async def test_callback_specific_param_run_pre_call_check_lakera():from typing import Dict, List, Optional, Union@@ -389,6 +397,7 @@ async def test_callback_specific_param_run_pre_call_check_lakera():@pytest.mark.asyncio[email protected](reason="lakera deprecated their v1 endpoint.")async def test_callback_specific_thresholds():from typing import Dict, List, Optional, Union