From 39f7575b648731813a88e7aa0ff4a75e846d0cc7 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 2 Dec 2025 06:19:48 -0500 Subject: [PATCH] refac: show connection type for custom models --- backend/open_webui/utils/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/open_webui/utils/models.py b/backend/open_webui/utils/models.py index 525ba22e76..fbd1089382 100644 --- a/backend/open_webui/utils/models.py +++ b/backend/open_webui/utils/models.py @@ -191,6 +191,8 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None) ): # Custom model based on a base model owned_by = "openai" + connection_type = None + pipe = None for m in models: @@ -201,6 +203,8 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None) owned_by = m.get("owned_by", "unknown") if "pipe" in m: pipe = m["pipe"] + + connection_type = m.get("connection_type", None) break model = { @@ -209,6 +213,7 @@ async def get_all_models(request, refresh: bool = False, user: UserModel = None) "object": "model", "created": custom_model.created_at, "owned_by": owned_by, + "connection_type": connection_type, "preset": True, **({"pipe": pipe} if pipe is not None else {}), }