From c97767424f6ac7daf61daa84e15cdb10f1965d36 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 8 Mar 2026 17:26:29 -0500 Subject: [PATCH] refac/fix --- backend/open_webui/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 202bd32c1..f13d31710 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1732,8 +1732,8 @@ async def chat_completion( } # Check base model existence for custom models - if model_info_params.get("base_model_id"): - base_model_id = model_info_params.get("base_model_id") + if model_info and model_info.base_model_id: + base_model_id = model_info.base_model_id if base_model_id not in request.app.state.MODELS: if ENABLE_CUSTOM_MODEL_FALLBACK: default_models = (