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_enforced_params_check

Ishaan Jaff13aa7f75f6df
diff --git a/tests/proxy_unit_tests/test_proxy_utils.py b/tests/proxy_unit_tests/test_proxy_utils.py
index d613118fc89..9fb00c094fe 100644
--- a/tests/proxy_unit_tests/test_proxy_utils.py
+++ b/tests/proxy_unit_tests/test_proxy_utils.py
@@ -822,6 +822,17 @@ def test_get_enforced_params(
api_key="test_api_key", user_id="test_user_id", org_id="test_org_id"
),
{},
+ False,
+ ),
+ (
+ {"service_account_settings": {"enforced_params": ["user"]}},
+ UserAPIKeyAuth(
+ api_key="test_api_key",
+ user_id="test_user_id",
+ org_id="test_org_id",
+ metadata={"service_account_id": "test_service_account_id"}
+ ),
+ {},
True,
),
(
@@ -854,6 +865,7 @@ def test_get_enforced_params(
{"service_account_settings": {"enforced_params": ["user"]}},
UserAPIKeyAuth(
api_key="test_api_key",
+ metadata={"service_account_id": "test_service_account_id"}
),
{"user": "test_user"},
False,