diff --git a/litellm/__init__.py b/litellm/__init__.py index 22255eb34a..bf084e2011 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -146,7 +146,7 @@ return_response_headers: bool = ( ) ################## logging: bool = True -enable_caching_on_optional_params: bool = ( +enable_caching_on_provider_specific_optional_params: bool = ( False # feature-flag for caching on optional params - e.g. 'top_k' ) caching: bool = ( diff --git a/litellm/caching.py b/litellm/caching.py index ab62c34406..6ed6eb9fdb 100644 --- a/litellm/caching.py +++ b/litellm/caching.py @@ -1903,7 +1903,7 @@ class Cache: param not in litellm_param_kwargs ): # check if user passed in optional param - e.g. top_k if ( - litellm.enable_caching_on_optional_params is True + litellm.enable_caching_on_provider_specific_optional_params is True ): # feature flagged for now if kwargs[param] is None: continue # ignore None params diff --git a/litellm/tests/test_caching.py b/litellm/tests/test_caching.py index b08f0039c4..a557956068 100644 --- a/litellm/tests/test_caching.py +++ b/litellm/tests/test_caching.py @@ -302,7 +302,7 @@ def test_caching_with_models_v2(): def test_caching_with_optional_params(): - litellm.enable_caching_on_optional_params = True + litellm.enable_caching_on_provider_specific_optional_params = True messages = [ {"role": "user", "content": "who is ishaan CTO of litellm from litellm 2023"} ] @@ -352,7 +352,7 @@ def test_caching_with_optional_params(): print(f"response1: {response1}") print(f"response2: {response2}") pytest.fail(f"Error occurred:") - litellm.enable_caching_on_optional_params = False + litellm.enable_caching_on_provider_specific_optional_params = False embedding_large_text = (