mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
feat(proxy_server.py): enable model aliases
This commit is contained in:
parent
356332d0da
commit
33e47dae8e
3 changed files with 16 additions and 9 deletions
|
@ -132,9 +132,12 @@ class Router:
|
|||
messages: Optional[List[Dict[str, str]]] = None,
|
||||
input: Optional[Union[str, List]] = None):
|
||||
"""
|
||||
Returns the deployment with the shortest queue
|
||||
Returns the deployment based on routing strategy
|
||||
"""
|
||||
logging.debug(f"self.healthy_deployments: {self.healthy_deployments}")
|
||||
if litellm.model_alias_map and model in litellm.model_alias_map:
|
||||
model = litellm.model_alias_map[
|
||||
model
|
||||
] # update the model to the actual value if an alias has been passed in
|
||||
if self.routing_strategy == "least-busy":
|
||||
if len(self.healthy_deployments) > 0:
|
||||
for item in self.healthy_deployments:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue