mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
Fix greptile comments
This commit is contained in:
parent
f22c00ce1c
commit
fd13e24d57
1 changed files with 8 additions and 4 deletions
|
|
@ -7105,8 +7105,8 @@ class Router:
|
|||
- model: dict - the deployment to index
|
||||
- idx: int - the index in model_list
|
||||
"""
|
||||
team_id = model.get("model_info", {}).get("team_id")
|
||||
team_public_model_name = model.get("model_info", {}).get(
|
||||
team_id = (model.get("model_info") or {}).get("team_id")
|
||||
team_public_model_name = (model.get("model_info") or {}).get(
|
||||
"team_public_model_name"
|
||||
)
|
||||
if team_id and team_public_model_name:
|
||||
|
|
@ -7164,7 +7164,10 @@ class Router:
|
|||
)
|
||||
if _deployment_on_router is not None:
|
||||
# deployment with this model_id exists on the router
|
||||
if deployment.litellm_params == _deployment_on_router.litellm_params:
|
||||
if (
|
||||
deployment.litellm_params == _deployment_on_router.litellm_params
|
||||
and deployment.model_info == _deployment_on_router.model_info
|
||||
):
|
||||
# No need to update
|
||||
return None
|
||||
|
||||
|
|
@ -8190,7 +8193,8 @@ class Router:
|
|||
returned_models.append(alias_model)
|
||||
else:
|
||||
returned_models.append(model)
|
||||
return returned_models
|
||||
if returned_models:
|
||||
return returned_models
|
||||
|
||||
# O(1) lookup in model_name index
|
||||
if model_name in self.model_name_to_deployment_indices:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue