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]

test string checked for model access control

Ishaan Jaff91a7fb0a2353
diff --git a/tests/otel_tests/test_e2e_model_access.py b/tests/otel_tests/test_e2e_model_access.py
index c4846c2478e..4628dc7e9c8 100644
--- a/tests/otel_tests/test_e2e_model_access.py
+++ b/tests/otel_tests/test_e2e_model_access.py
@@ -94,7 +94,7 @@ async def test_model_access_patterns(key_models, test_model, expect_success):
assert _error_body["type"] == "key_model_access_denied"
assert _error_body["param"] == "model"
assert _error_body["code"] == "401"
- assert "API Key not allowed to access model" in _error_body["message"]
+ assert "key not allowed to access model" in _error_body["message"]
@pytest.mark.asyncio
diff --git a/tests/test_openai_endpoints.py b/tests/test_openai_endpoints.py
index 45fd29721f7..16b9838d80b 100644
--- a/tests/test_openai_endpoints.py
+++ b/tests/test_openai_endpoints.py
@@ -308,7 +308,7 @@ async def test_chat_completion():
model="gpt-4",
messages=[{"role": "user", "content": "Hello!"}],
)
- assert "API Key not allowed to access model." in str(e)
+ assert "key not allowed to access model." in str(e)
@pytest.mark.asyncio