From d8906d33f7dfd41332a844f1069aefcd7ad9635e Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Thu, 5 Mar 2026 14:50:32 -0800 Subject: [PATCH] address greptile review feedback (greploop iteration 8) --- litellm/proxy/management_endpoints/ui_sso.py | 2 +- .../test_litellm/proxy/management_endpoints/test_ui_sso.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/management_endpoints/ui_sso.py b/litellm/proxy/management_endpoints/ui_sso.py index a95b19c57f3..6fb5f5f0e25 100644 --- a/litellm/proxy/management_endpoints/ui_sso.py +++ b/litellm/proxy/management_endpoints/ui_sso.py @@ -2593,7 +2593,7 @@ class SSOAuthenticationHandler: Returns a combined dict of the token response and user info, suitable for passing to a response_convertor. """ - verbose_proxy_logger.info( + verbose_proxy_logger.debug( "PKCE: performing direct token exchange (code_verifier length=%d)", len(code_verifier), ) diff --git a/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py b/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py index 6e5ee6b14a8..645df793ac4 100644 --- a/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py +++ b/tests/test_litellm/proxy/management_endpoints/test_ui_sso.py @@ -3142,10 +3142,12 @@ class TestPKCEFunctionality: test_state = "test_oauth_state_123" mock_request.query_params = {"state": test_state} - # Mock cache with async methods + # Mock cache with async methods — use dict format (primary path) mock_cache = MagicMock() test_code_verifier = "test_code_verifier_abc123xyz" - mock_cache.async_get_cache = AsyncMock(return_value=test_code_verifier) + mock_cache.async_get_cache = AsyncMock( + return_value={"code_verifier": test_code_verifier} + ) mock_cache.async_delete_cache = AsyncMock() with patch("litellm.proxy.proxy_server.redis_usage_cache", None), patch("litellm.proxy.proxy_server.user_api_key_cache", mock_cache), patch.dict(os.environ, {"GENERIC_CLIENT_USE_PKCE": "true"}):