open-webui/open-webui · warning · HTTPException
Provider "{provider or "default"}" does not support model un
Error message
Provider "{provider or "default"}" does not support model unloading What it means
Terminal else-branch of the unload-model endpoint (backend/open_webui/main.py:1003): the endpoint implements unloading only for Ollama and llama.cpp providers. If the model resolves to any other OpenAI-compatible provider (no 'llama.cpp' provider marker), it raises HTTPException 400 stating that provider does not support model unloading. 'default' appears when the provider field is empty, which itself hits this branch for non-local backends.
Source
Thrown at backend/open_webui/main.py:1003
'Content-Type': 'application/json',
**({'Authorization': f'Bearer {key}'} if key else {}),
}
async with session.post(
f'{root_url}/models/unload',
json={'model': actual_model},
headers=headers,
) as r:
if not r.ok:
detail = await r.text()
raise HTTPException(status_code=r.status, detail=detail)
return await r.json()
except HTTPException:
raise
except Exception as e:
log.exception(f'Failed to unload model via llama.cpp: {e}')
raise HTTPException(status_code=500, detail=str(e))
else:
raise HTTPException(
status_code=400,
detail=f'Provider "{provider or "default"}" does not support model unloading',
)
raise HTTPException(status_code=404, detail=f'Model "{model_id}" not found')
##################################
# Embeddings
##################################
@app.post('/api/embeddings')
@app.post('/api/v1/embeddings') # Experimental: Compatibility with OpenAI API
async def embeddings(request: Request, form_data: dict, user=Depends(get_verified_user)):
"""
OpenAI-compatible embeddings endpoint.
View on GitHub (pinned to 01f4282f1f)
Solutions
- Unload via the provider's own mechanism (vLLM admin API, LM Studio UI, cloud console) — Open WebUI cannot do it for that provider.
- If the backend really is llama.cpp, ensure the connection's provider field is set to 'llama.cpp' so the unload branch is selected.
- Treat the 400 as expected behavior for remote/OpenAI-compatible providers.
Defensive patterns
Strategy: validation
Validate before calling
model = MODELS.get(model_id)
supports_unload = model is not None and (
model.get('owned_by') == 'ollama' or model.get('provider') == 'llama.cpp'
)
if not supports_unload:
print('Unload not supported for this provider; use the provider-native method') Type guard
def supports_unload(model_entry: dict) -> bool:
return model_entry.get('provider') in {'ollama', 'llama.cpp'} Try / catch
try:
resp = await client.post(f'/api/v1/models/{model_id}/unload')
except HTTPStatusError as e:
if e.response.status_code == 400 and 'does not support model unloading' in e.response.text():
pass # expected for OpenAI-compatible providers; handle out-of-band Prevention
- Gate unload UI buttons on provider type (Ollama/llama.cpp only).
- For vLLM/cloud providers, manage model lifecycle on the provider side.
When it happens
Trigger: POST unload for a model whose connection entry is an OpenAI-compatible API (vLLM without llama.cpp marker, LM Studio, OpenRouter, Azure, a gateway) or an entry with no provider set.
Common situations: Users expecting every OpenAI-compatible server to expose an unload endpoint; vLLM deployments (lifecycle is managed by the server, not the client); missing provider metadata in the connection config.
Related errors
- Failed to unload model on {len(errors)} node(s): {errors}
- detail
- str(e)
- Model "{model_id}" not found
- Model not found
AI-assisted analysis of open-webui/open-webui@01f4282f1f (2026-08-14).
Data as JSON: /api/errors/44642fc00fd1ce11.
Report an issue: GitHub.