From a40808579fcca92761e219ea50384c0bd51ba646 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 12 Feb 2026 10:59:41 -0600 Subject: [PATCH] refac --- backend/open_webui/routers/openai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py index aae86e49e..e5db9e146 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -979,7 +979,7 @@ async def generate_chat_completion( # Check if model is already in app state cache to avoid expensive get_all_models() call models = request.app.state.OPENAI_MODELS - if not models or model not in models: + if not models or model_id not in models: await get_all_models(request, user=user) models = request.app.state.OPENAI_MODELS model = models.get(model_id)