fix least_busy router by updating min_traffic

This commit is contained in:
AllentDan 2023-12-20 18:16:00 +08:00 committed by GitHub
parent f0df28362a
commit 6b19db0327
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1177,6 +1177,7 @@ class Router:
min_deployment = None
for k, v in deployments.items():
if v < min_traffic:
min_traffic = v
min_deployment = k
############## No Available Deployments passed, we do a random pick #################
if min_deployment is None:
@ -1248,4 +1249,4 @@ class Router:
litellm.failure_callback = []
litellm._async_failure_callback = []
self.flush_cache()