diff --git a/litellm/__init__.py b/litellm/__init__.py index 6dc678b3e5..bf084e2011 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -146,6 +146,9 @@ return_response_headers: bool = ( ) ################## logging: bool = True +enable_caching_on_provider_specific_optional_params: bool = ( + False # feature-flag for caching on optional params - e.g. 'top_k' +) caching: bool = ( False # Not used anymore, will be removed in next MAJOR release - https://github.com/BerriAI/litellm/discussions/648 ) diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 1d0eef6a0e..e1bc363d63 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -19,11 +19,17 @@ litellm_mode = os.getenv("LITELLM_MODE", "DEV") # "PRODUCTION", "DEV" if litellm_mode == "DEV": load_dotenv() import shutil +from enum import Enum from importlib import resources telemetry = None +class LiteLLMDatabaseConnectionPool(Enum): + database_connection_pool_limit = 10 + database_connection_pool_timeout = 60 + + def append_query_params(url, params) -> str: from litellm._logging import verbose_proxy_logger @@ -526,10 +532,12 @@ def run_server( ) database_url = general_settings.get("database_url", None) db_connection_pool_limit = general_settings.get( - "database_connection_pool_limit", 100 + "database_connection_pool_limit", + LiteLLMDatabaseConnectionPool.database_connection_pool_limit.value, ) db_connection_timeout = general_settings.get( - "database_connection_timeout", 60 + "database_connection_timeout", + LiteLLMDatabaseConnectionPool.database_connection_pool_timeout.value, ) if database_url and database_url.startswith("os.environ/"): original_dir = os.getcwd()