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
This commit is contained in:
Classic298
2026-09-30 19:49:59 +04:00
committed by GitHub
parent d09ab78fce
commit fab58bd35f
+2
View File
@@ -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()