Fix greptile comments

This commit is contained in:
Sameer Kankute 2026-03-23 19:37:05 +05:30 committed by shivam
parent f22c00ce1c
commit fd13e24d57

View file

@ -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: