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 17:49:59 +02:00 • committed by GitHub
parent d09ab78fce
commit fab58bd35f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()