fix: bump default allowed_fails + reduce default db pool limit

Fixes issues with running proxy server in production
This commit is contained in:
Krrish Dholakia 2024-08-05 15:07:46 -07:00
parent 14d0ae6aa4
commit b5e22bde06
2 changed files with 13 additions and 2 deletions

View file

@ -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
)

View file

@ -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()