mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(router.py): fix int logic
This commit is contained in:
parent
cf91e49c87
commit
2fc264ca04
3 changed files with 11 additions and 3 deletions
|
@ -1546,9 +1546,11 @@ class Router:
|
|||
############## Available Deployments passed, we find the relevant item #################
|
||||
else:
|
||||
## check if min deployment is a string, if so, cast it to int
|
||||
if isinstance(min_deployment, str):
|
||||
min_deployment = int(min_deployment)
|
||||
for m in healthy_deployments:
|
||||
if isinstance(min_deployment, str) and isinstance(
|
||||
m["model_info"]["id"], int
|
||||
):
|
||||
min_deployment = int(min_deployment)
|
||||
if m["model_info"]["id"] == min_deployment:
|
||||
return m
|
||||
self.print_verbose(f"no healthy deployment with that id found!")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue