mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 20:07:49 +01:00
refac/fix: model name retrieval edge case
This commit is contained in:
@@ -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 ""),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user