mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
chore(router): drop unreachable unknown-model error branch
get_model_list always returns a list, never None, so the is-None branch could not execute. Collapse to the single reachable message.
This commit is contained in:
parent
453aedef95
commit
9b4442c6df
1 changed files with 1 additions and 4 deletions
|
|
@ -10031,10 +10031,7 @@ class Router:
|
|||
|
||||
# If still no deployments after checking for fallbacks, raise an error
|
||||
if len(healthy_deployments) == 0:
|
||||
if self.get_model_list(model_name=model) is None:
|
||||
message = f"You passed in model={model}. There is no 'model_name' with this string"
|
||||
else:
|
||||
message = f"You passed in model={model}. There are no healthy deployments for this model"
|
||||
message = f"You passed in model={model}. There are no healthy deployments for this model"
|
||||
|
||||
raise litellm.BadRequestError(
|
||||
message=message,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue