(feat) router - add model_group_alias_map

This commit is contained in:
ishaan-jaff 2023-12-06 20:13:22 -08:00
parent 9573123e2b
commit ee70c4e822
3 changed files with 57 additions and 1 deletions

View file

@ -1101,6 +1101,11 @@ class Router:
return deployment
raise ValueError(f"LiteLLM Router: Trying to call specific deployment, but Model:{model} does not exist in Model List: {self.model_list}")
# check if aliases set on litellm model alias map
if model in litellm.model_group_alias_map:
self.print_verbose(f"Using a model alias. Got Request for {model}, sending requests to {litellm.model_group_alias_map.get(model)}")
model = litellm.model_group_alias_map.get(model)
## get healthy deployments
### get all deployments
### filter out the deployments currently cooling down