From 626b768d25311817738fb56b89f08a30cf24fcec Mon Sep 17 00:00:00 2001 From: user <70670632+stuxf@users.noreply.github.com> Date: Thu, 14 May 2026 03:39:15 +0000 Subject: [PATCH] chore(tests): drop redundant membership check; trim test comment ``test_azure_ad_token_is_in_banned_list`` only asserted tuple membership of a name the parametrized test already exercises end-to-end through ``is_request_body_safe``. Removed. Tightened the admin-opt-in test comment. --- .../proxy/auth/test_banned_params_extra_body.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/test_litellm/proxy/auth/test_banned_params_extra_body.py b/tests/test_litellm/proxy/auth/test_banned_params_extra_body.py index fd33f22480..2ccee38628 100644 --- a/tests/test_litellm/proxy/auth/test_banned_params_extra_body.py +++ b/tests/test_litellm/proxy/auth/test_banned_params_extra_body.py @@ -14,10 +14,7 @@ sys.path.insert( 0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../..")) ) -from litellm.proxy.auth.auth_utils import ( # noqa: E402 - _BANNED_REQUEST_BODY_PARAMS, - is_request_body_safe, -) +from litellm.proxy.auth.auth_utils import is_request_body_safe # noqa: E402 @pytest.mark.parametrize( @@ -47,10 +44,6 @@ def test_banned_param_under_extra_body_is_rejected(banned_param): ) -def test_azure_ad_token_is_in_banned_list(): - assert "azure_ad_token" in _BANNED_REQUEST_BODY_PARAMS - - def test_extra_body_with_safe_fields_is_allowed(): body = { "model": "openai/gpt-4", @@ -66,9 +59,8 @@ def test_extra_body_with_safe_fields_is_allowed(): def test_admin_opt_in_still_permits_extra_body_credentials(): - # ``general_settings.allow_client_side_credentials`` is the documented - # admin escape for clientside-credential passthrough. Walking - # ``extra_body`` for banned params must not break the escape. + # ``allow_client_side_credentials`` is the admin escape; descending + # into ``extra_body`` must preserve it. body = { "model": "openai/gpt-4", "messages": [{"role": "user", "content": "x"}],