mirror of
https://github.com/open-webui/open-webui
synced 2025-04-28 18:21:48 +00:00
fix: model list hide issue
This commit is contained in:
parent
d5ee39de21
commit
daabc188e8
@ -114,9 +114,12 @@ async def get_all_models(request, user: UserModel = None):
|
||||
for custom_model in custom_models:
|
||||
if custom_model.base_model_id is None:
|
||||
for model in models:
|
||||
if (
|
||||
custom_model.id == model["id"]
|
||||
or custom_model.id == model["id"].split(":")[0]
|
||||
if custom_model.id == model["id"] or (
|
||||
model.get("owned_by") == "ollama"
|
||||
and custom_model.id
|
||||
== model["id"].split(":")[
|
||||
0
|
||||
] # Ollama may return model ids in different formats (e.g., 'llama3' vs. 'llama3:7b')
|
||||
):
|
||||
if custom_model.is_active:
|
||||
model["name"] = custom_model.name
|
||||
|
Loading…
Reference in New Issue
Block a user