mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
fix: use redis_kwargs host/port in cache ping health check (#24636)
This commit is contained in:
parent
5be0797d24
commit
42ce3aa82a
1 changed files with 5 additions and 0 deletions
|
|
@ -40,6 +40,11 @@ def _extract_cache_params() -> Dict[str, Any]:
|
|||
return {}
|
||||
try:
|
||||
cache_params = vars(litellm.cache.cache)
|
||||
if cache_params.get("redis_kwargs"):
|
||||
if not cache_params.get("host"):
|
||||
cache_params["host"] = cache_params["redis_kwargs"].get("host")
|
||||
if not cache_params.get("port"):
|
||||
cache_params["port"] = cache_params["redis_kwargs"].get("port")
|
||||
cleaned_params = (
|
||||
HealthCheckCacheParams(**cache_params).model_dump() if cache_params else {}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue