From fab58bd35fd7bcef3000ffc0eb0f977893e1a971 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Wed, 30 Sep 2026 17:49:59 +0200 Subject: [PATCH] fix: ejecting a model ignores AIOHTTP_CLIENT_SESSION_SSL (#31391) Ejecting a loaded model from the model selector failed with a certificate error on llama.cpp and Ollama connections served over HTTPS with a self-signed or internal CA, even though chatting with the same connection worked. The unload request skipped the AIOHTTP_CLIENT_SESSION_SSL setting and always verified against the default system certificates, so setting it to a CA bundle or to false had no effect there. It now uses that setting, the same way chat requests to the connection already do. Fixes #31371 --- backend/open_webui/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index 694c62a543..247146f7fb 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1006,6 +1006,7 @@ async def unload_model(request: Request, form_data: ModelUnloadForm, user=Depend data=payload, headers=headers, cookies=cookies, + ssl=AIOHTTP_CLIENT_SESSION_SSL, ) as r: if not r.ok: errors.append({'url_idx': idx, 'error': await r.text()}) @@ -1045,6 +1046,7 @@ async def unload_model(request: Request, form_data: ModelUnloadForm, user=Depend json={'model': actual_model}, headers=headers, cookies=cookies, + ssl=AIOHTTP_CLIENT_SESSION_SSL, ) as r: if not r.ok: detail = await r.text()