Description: After selecting a .gguf model file in any directory using the Browse button in the template editor, the model card always displays "Missing File", the Start button is disabled, and the model cannot be started. However, the file actually exists on the disk.
Reproduction Steps
-
Click Create/Edit Template
-
Click the Browse button next to Model File
-
Select /some/arbitrary/path/model.gguf (not in models/ or an added external directory)
-
Save the template → The card displays "Missing File," and the Start button is grayed out and unclickable.
Root Cause
The logic for determining file existence in ModelCard.tsx:14 is:
const modelExists = !card.template.modelPath || models.some(m => m.path === card.template.modelPath)
Where models comes from list-models (ipc.ts:188-214), it only scans two locations:
Although the file path selected from other directories using Browse is correctly saved in the template, it is not in the scan list → modelExists is always false → False "Missing File" report.
The fundamental error is that a cached list of models is used instead of a real disk existence check.
Description: After selecting a .gguf model file in any directory using the Browse button in the template editor, the model card always displays "Missing File", the Start button is disabled, and the model cannot be started. However, the file actually exists on the disk.
Reproduction Steps
Click Create/Edit Template
Click the Browse button next to Model File
Select /some/arbitrary/path/model.gguf (not in models/ or an added external directory)
Save the template → The card displays "Missing File," and the Start button is grayed out and unclickable.
Root Cause
The logic for determining file existence in ModelCard.tsx:14 is:
const modelExists = !card.template.modelPath || models.some(m => m.path === card.template.modelPath)
Where models comes from list-models (ipc.ts:188-214), it only scans two locations:
Default models/ directory
externalModelFolders recorded in settings.json
Although the file path selected from other directories using Browse is correctly saved in the template, it is not in the scan list → modelExists is always false → False "Missing File" report.
The fundamental error is that a cached list of models is used instead of a real disk existence check.