mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
refac
This commit is contained in:
parent
230e21b10c
commit
4cca1829c2
1 changed files with 1 additions and 1 deletions
|
|
@ -1317,7 +1317,7 @@ async def get_models(
|
|||
model_order_dict = {model_id: i for i, model_id in enumerate(model_order_list)}
|
||||
# Sort models by order list priority, with fallback for those not in the list
|
||||
models.sort(
|
||||
key=lambda x: (model_order_dict.get(x["id"], float("inf")), x["name"])
|
||||
key=lambda x: (model_order_dict.get(x["id"], float("inf")), x.get("name"))
|
||||
)
|
||||
|
||||
# Filter out models that the user does not have access to
|
||||
|
|
|
|||
Loading…
Reference in a new issue