LocalAI icon indicating copy to clipboard operation
LocalAI copied to clipboard

Deletion of configuration file results in deletion of model file even if other configuration file uses model file

Open Expro opened this issue 1 month ago • 1 comments

LocalAI version: v3.7.0

Describe the bug If user creates multiple configuration files pointing to same model file and delete just one of configuration files, underlying model file is also deleted, rendering rest of configuration files inoperable.

To Reproduce

  1. Download model from gallery
  2. Copy configuration file of downloaded model and import it as another model, changing just name
  3. Delete one of configuration files
  4. Try to use model hosted by other configuration file

Expected behavior

LocalAI counts how many configuration files references model file, deleting model file only when last configuration file is deleted. If after deletion of configuration file there are other configuration files using same underlying model file, model file is not deleted.

Expro avatar Nov 07 '25 10:11 Expro

Can confirm this, fix is on its way in #7235

mudler avatar Nov 11 '25 13:11 mudler