mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
Merge pull request #4518 from BerriAI/litellm_fix_background_health_checks
[Fix-Proxy] Background health checks use deep copy of model list for _run_background_health_check
This commit is contained in:
commit
174b2b69df
1 changed files with 5 additions and 1 deletions
|
@ -1182,9 +1182,13 @@ async def _run_background_health_check():
|
|||
Update health_check_results, based on this.
|
||||
"""
|
||||
global health_check_results, llm_model_list, health_check_interval
|
||||
|
||||
# make 1 deep copy of llm_model_list -> use this for all background health checks
|
||||
_llm_model_list = copy.deepcopy(llm_model_list)
|
||||
|
||||
while True:
|
||||
healthy_endpoints, unhealthy_endpoints = await perform_health_check(
|
||||
model_list=llm_model_list
|
||||
model_list=_llm_model_list
|
||||
)
|
||||
|
||||
# Update the global variable with the health check results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue