HTTP error body is saved as the model file and reported as a successful download
When trying to download a model and the server returns an error, it is treated as a file download. It will fail, but the server error message should be report instead of this:
PS C:\Users\xxxxxx\Documents\GitHub\OpenFlowLM-Next\src> .\build\oflm.exe pull qwen3:0.6b
[OFLM] Using custom model list path: C:\Users\xxxxxx\.config\oflm\model_list.json
[OFLM] Pulling model from HuggingFace...
[OFLM] Model: qwen3:0.6b
[OFLM] Name: Qwen3-0.6B-NPU2
[OFLM] Missing files (4):
- config.json
- model.q4nx
- tokenizer.json
- tokenizer_config.json
[OFLM] Downloading 4 missing files...
[OFLM] Files to download (663.05 MB):
- config.json (0.00 MB)
- model.q4nx (652.14 MB)
- tokenizer.json (10.89 MB)
- tokenizer_config.json (0.01 MB)
[OFLM] Downloading 1/4: config.json
[OFLM] Checking Hash...
[WARN] Hash mismatch (expected 59f8fd3b0b3266917f24c0888efbdfba32a8ceb7, have 212168c4c13518ec5fd832fc3b0cab000500a0ac); continuing
[OFLM] Download completed: C:\Users\xxxxxx\Documents\flm\models\Qwen3-0.6B-NPU2\config.json
[OFLM] Overall progress: 1/4 files
[OFLM] Downloading 2/4: model.q4nx
[OFLM] Checking Hash...
[WARN] Hash mismatch (expected db8dec4dff653817218ff920c5d25d28d1805512906485e654f03980053fa667, have 45b71fe98efe5f530b825dce6f5049d738e9c16869f10be4370ab81a9912d4a6); continuing
[OFLM] Download completed: C:\Users\xxxxxx\Documents\flm\models\Qwen3-0.6B-NPU2\model.q4nx
[OFLM] Overall progress: 2/4 files
[OFLM] Downloading 3/4: tokenizer.json
[OFLM] Checking Hash...
[WARN] Hash mismatch (expected aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4, have 45b71fe98efe5f530b825dce6f5049d738e9c16869f10be4370ab81a9912d4a6); continuing
[OFLM] Download completed: C:\Users\xxxxxx\Documents\flm\models\Qwen3-0.6B-NPU2\tokenizer.json
[OFLM] Overall progress: 3/4 files
[OFLM] Downloading 4/4: tokenizer_config.json
[OFLM] Checking Hash...
[WARN] Hash mismatch (expected c5e960f8f86088760f876dca70aba8e97bbe89f6, have 212168c4c13518ec5fd832fc3b0cab000500a0ac); continuing
[OFLM] Download completed: C:\Users\xxxxxx\Documents\flm\models\Qwen3-0.6B-NPU2\tokenizer_config.json
[OFLM] Overall progress: 4/4 files
[OFLM] All downloads completed successfully!
[OFLM] Model downloaded successfully!
[WARNING] config.json is 29 bytes, the manifest says 869 -- treating it as missing
[WARNING] model.q4nx is 29 bytes, the manifest says 683820832 -- treating it as missing
[WARNING] tokenizer.json is 29 bytes, the manifest says 11422654 -- treating it as missing
[WARNING] tokenizer_config.json is 29 bytes, the manifest says 10055 -- treating it as missing
[WARNING] Some files may be missing after download:
- config.json
- model.q4nx
- tokenizer.json
- tokenizer_config.json
The files just contains the error message. For example model.q4nx looks like this:
Invalid username or password.
I think we should handle this in #34 and retire the pull command altogether.
a discord user is hitting this issue. I don't know if we should retire the pull or go for a focused fix here.
I actually think we should retire pull, and do it through add. Unless it's a lot easier to fix pull. Something did change with how hf hosts though I think, I was running into the same issue in a whole different context.