mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
Revert "Merge pull request #16547 from Gyarbij/main"
This reverts commitdd3cd4ac4f, reversing changes made tof0c2d47b24.
This commit is contained in:
parent
dd3cd4ac4f
commit
230e21b10c
1 changed files with 1 additions and 4 deletions
|
|
@ -1317,10 +1317,7 @@ async def get_models(
|
||||||
model_order_dict = {model_id: i for i, model_id in enumerate(model_order_list)}
|
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
|
# Sort models by order list priority, with fallback for those not in the list
|
||||||
models.sort(
|
models.sort(
|
||||||
key=lambda x: (
|
key=lambda x: (model_order_dict.get(x["id"], float("inf")), x["name"])
|
||||||
model_order_dict.get(x.get("id"), float("inf")),
|
|
||||||
(x.get("name") or "").lower()
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Filter out models that the user does not have access to
|
# Filter out models that the user does not have access to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue