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 test_moderations_bad_model

Ishaan Jaff5670a9f8b7f0
diff --git a/tests/store_model_in_db_tests/test_openai_error_handling.py b/tests/store_model_in_db_tests/test_openai_error_handling.py
index 769042ab7e4..ea94c31c815 100644
--- a/tests/store_model_in_db_tests/test_openai_error_handling.py
+++ b/tests/store_model_in_db_tests/test_openai_error_handling.py
@@ -77,17 +77,6 @@ def test_images_bad_model():
print(f"Images error: {excinfo.value}")
-def test_moderations_bad_model():
- key = generate_key_sync()
- client = OpenAI(api_key=key, base_url="http://0.0.0.0:4000")
-
- with pytest.raises(BadRequestError) as excinfo:
- client.moderations.create(
- model="non-existent-model", input="I want to harm someone."
- )
- print(f"Moderations error: {excinfo.value}")
-
-
@pytest.mark.asyncio
async def test_async_chat_completion_bad_model():
key = generate_key_sync()