address greptile review feedback (greploop iteration 28)

This commit is contained in:
Ishaan Jaffer 2026-03-06 09:29:15 -08:00
parent 7e8b9d50e8
commit e55e7546d0
2 changed files with 8 additions and 3 deletions

View file

@ -3032,9 +3032,12 @@ class ProxyConfig:
if use_pkce and redis_usage_cache is None:
verbose_proxy_logger.warning(
"GENERIC_CLIENT_USE_PKCE=true but Redis is not configured for LiteLLM caching. "
"PKCE verifiers will not be shared across instances. "
"PKCE verifiers will not be shared across instances — callbacks may land on a "
"different pod than the login request and fail silently. "
"Configure Redis via the 'cache' section in your proxy config, "
"or enable sticky sessions for multi-instance deployments."
"or enable sticky sessions for single-instance deployments. "
"Set PKCE_STRICT_CACHE_MISS=true to fail fast with a 401 on cache misses "
"instead of continuing without a code_verifier."
)
### STORE MODEL IN DB ### feature flag for `/model/new`
store_model_in_db = general_settings.get("store_model_in_db", False)

View file

@ -3195,7 +3195,9 @@ class TestPKCEFunctionality:
mock_cache.async_set_cache = AsyncMock()
with patch.dict(os.environ, {"GENERIC_CLIENT_USE_PKCE": "true"}):
with patch("litellm.proxy.proxy_server.user_api_key_cache", mock_cache):
with patch("litellm.proxy.proxy_server.redis_usage_cache", None), patch(
"litellm.proxy.proxy_server.user_api_key_cache", mock_cache
):
# Act
result = await SSOAuthenticationHandler.get_generic_sso_redirect_response(
generic_sso=mock_sso,