diff --git a/litellm/caching/caching.py b/litellm/caching/caching.py index 088922046e1..4a7ed6a76e9 100644 --- a/litellm/caching/caching.py +++ b/litellm/caching/caching.py @@ -393,13 +393,18 @@ class Cache: continue # ignore None params param_value = kwargs[param] cache_key += f"{param}: {param_value}" - elif kwargs[param] is not None and param not in _warned_dropped_cache_params: + elif ( + kwargs[param] is not None + and param not in _warned_dropped_cache_params + and len(_warned_dropped_cache_params) < 100 + ): _warned_dropped_cache_params.add(param) verbose_logger.warning( "litellm.cache: provider-specific param '%s' is excluded from the cache key by default, " "so requests differing only in '%s' will return the same cached response. " "Set litellm.enable_caching_on_provider_specific_optional_params=True to include it in the key.", - param, param, + param, + param, ) if is_semantic_cache: