[Frontend] Name the served models in the model-not-found 404 (#59889)
Signed-off-by: TyroneNel <71038642+TyroneNel@users.noreply.github.com> Signed-off-by: TyroneNel <Tyrone.Nel@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -63,8 +63,12 @@ class BaseServing:
|
||||
):
|
||||
error_response = load_result
|
||||
|
||||
served_names = ", ".join(model.name for model in self.models.base_model_paths)
|
||||
return error_response or self.create_error_response(
|
||||
message=f"The model `{request.model}` does not exist.",
|
||||
message=(
|
||||
f"The model `{request.model}` does not exist. "
|
||||
f"Valid aliases: {served_names}."
|
||||
),
|
||||
err_type="NotFoundError",
|
||||
status_code=HTTPStatus.NOT_FOUND,
|
||||
param="model",
|
||||
|
||||
Reference in New Issue
Block a user