mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac/fix: model name retrieval edge case
This commit is contained in:
parent
40f60c163d
commit
2387877dae
1 changed files with 2 additions and 2 deletions
|
|
@ -1324,8 +1324,8 @@ async def get_models(
|
|||
# Sort models by order list priority, with fallback for those not in the list
|
||||
models.sort(
|
||||
key=lambda model: (
|
||||
model_order_dict.get(model.get("id"), float("inf")),
|
||||
model.get("name"),
|
||||
model_order_dict.get(model.get("id", ""), float("inf")),
|
||||
(model.get("name", "") or ""),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue