mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix use provider specific routing
This commit is contained in:
parent
218ba0f470
commit
f1ffa82062
4 changed files with 35 additions and 15 deletions
|
@ -4469,13 +4469,7 @@ class Router:
|
|||
)
|
||||
model = self.model_group_alias[model]
|
||||
|
||||
if model not in self.model_names and self.default_deployment is not None:
|
||||
updated_deployment = copy.deepcopy(
|
||||
self.default_deployment
|
||||
) # self.default_deployment
|
||||
updated_deployment["litellm_params"]["model"] = model
|
||||
return model, updated_deployment
|
||||
elif model not in self.model_names:
|
||||
if model not in self.model_names:
|
||||
# check if provider/ specific wildcard routing
|
||||
try:
|
||||
(
|
||||
|
@ -4499,6 +4493,14 @@ class Router:
|
|||
# get_llm_provider raises exception when provider is unknown
|
||||
pass
|
||||
|
||||
# check if default deployment is set
|
||||
if self.default_deployment is not None:
|
||||
updated_deployment = copy.deepcopy(
|
||||
self.default_deployment
|
||||
) # self.default_deployment
|
||||
updated_deployment["litellm_params"]["model"] = model
|
||||
return model, updated_deployment
|
||||
|
||||
## get healthy deployments
|
||||
### get all deployments
|
||||
healthy_deployments = [m for m in self.model_list if m["model_name"] == model]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue