The /delete-cached guard refused deleting a cached repo whose id is a bare prefix of the loaded one: with Qwen/Qwen-Image-2512 loaded, deleting the separate cached Qwen/Qwen-Image returned 400 "Unload the model before deleting" because loaded_id.startswith(repo_id) matched across the repo boundary. Both are real, independently cached catalog artifacts, so a supported delete was wrongly blocked. Add a /-boundary aware _loaded_id_matches_repo helper (mirroring hub/services/models/deletion.py) and use it at all six guard sites (chat, Images, Video, and their in-flight loading-id loops), so only the loaded repo itself or a file within it blocks deletion. Add a regression test covering the sibling-prefix pair. |
||
|---|---|---|
| .. | ||
| data_recipe | ||
| .gitkeep | ||
| __init__.py | ||
| auth.py | ||
| chat_history.py | ||
| datasets.py | ||
| export.py | ||
| inference.py | ||
| llama.py | ||
| mcp_servers.py | ||
| models.py | ||
| preview.py | ||
| prompts.py | ||
| providers.py | ||
| rag.py | ||
| settings.py | ||
| training.py | ||
| training_history.py | ||
| training_vram.py | ||
| video.py | ||