From 632283a371abcb4f5212e563fe3142af4074d7b7 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 25 Nov 2024 15:48:40 -0800 Subject: [PATCH] add coverage --- tests/proxy_unit_tests/test_user_api_key_auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/proxy_unit_tests/test_user_api_key_auth.py b/tests/proxy_unit_tests/test_user_api_key_auth.py index 913ff34e1559..da883b7e6988 100644 --- a/tests/proxy_unit_tests/test_user_api_key_auth.py +++ b/tests/proxy_unit_tests/test_user_api_key_auth.py @@ -409,6 +409,8 @@ def test_is_api_route_allowed(route, user_role, expected_result): ("custom_engine/model-123", ["custom_engine/*"], True), ("custom_engine/model-123", ["custom_engine/*", "azure/*"], True), ("custom-engine/model-123", ["custom_engine/*", "azure/*"], False), + ("openai/gpt-4o", ["openai/*"], True), + ("openai/gpt-12", ["openai/*"], True), ("gpt-4", ["gpt-*"], True), ("gpt-4", ["claude-*"], False), # Mixed scenarios @@ -430,6 +432,7 @@ def test_model_is_within_list_of_allowed_models(model, allowed_models, expected_ ("gpt-4", ["gpt-*"], True), ("azure/gpt-4", ["azure/*"], True), ("custom_engine/model-123", ["custom_engine/*"], True), + ("openai/my-fake-model", ["openai/*"], True), ("custom_engine/model-123", ["custom_engine/*", "azure/*"], True), ("custom-engine/model-123", ["custom_engine/*", "azure/*"], False), # Multiple patterns