mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 10:14:26 +00:00
Merge 322c7cd353
into b82af5b826
This commit is contained in:
commit
9abe428929
1 changed files with 10 additions and 4 deletions
|
@ -1215,6 +1215,14 @@ async def _run_background_health_check():
|
|||
if _llm_model_list is None:
|
||||
return
|
||||
|
||||
try:
|
||||
health_check_interval = float(health_check_interval) # type: ignore Type errors are handled in the exception handler below
|
||||
except (ValueError, TypeError):
|
||||
verbose_proxy_logger.error(
|
||||
f"Not running background health checks due to invalid health_check_interval '{health_check_interval}'."
|
||||
)
|
||||
return
|
||||
|
||||
while True:
|
||||
healthy_endpoints, unhealthy_endpoints = await perform_health_check(
|
||||
model_list=_llm_model_list, details=health_check_details
|
||||
|
@ -1226,10 +1234,7 @@ async def _run_background_health_check():
|
|||
health_check_results["healthy_count"] = len(healthy_endpoints)
|
||||
health_check_results["unhealthy_count"] = len(unhealthy_endpoints)
|
||||
|
||||
if health_check_interval is not None and isinstance(
|
||||
health_check_interval, float
|
||||
):
|
||||
await asyncio.sleep(health_check_interval)
|
||||
await asyncio.sleep(health_check_interval)
|
||||
|
||||
|
||||
class StreamingCallbackError(Exception):
|
||||
|
@ -1449,6 +1454,7 @@ class ProxyConfig:
|
|||
## INIT PROXY REDIS USAGE CLIENT ##
|
||||
redis_usage_cache = litellm.cache.cache
|
||||
|
||||
|
||||
async def get_config(self, config_file_path: Optional[str] = None) -> dict:
|
||||
"""
|
||||
Load config file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue