mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +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
|
# Sort models by order list priority, with fallback for those not in the list
|
||||||
models.sort(
|
models.sort(
|
||||||
key=lambda model: (
|
key=lambda model: (
|
||||||
model_order_dict.get(model.get("id"), float("inf")),
|
model_order_dict.get(model.get("id", ""), float("inf")),
|
||||||
model.get("name"),
|
(model.get("name", "") or ""),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue