AIBoMGen CLI version
v0.2.1
Go version (if built from source)
go1.25.x
Operating system
Any
Command used
aibomgen-cli generate --model-id org/nonexistent-model --output ./dist/out.json
Expected behavior
No BOM file is created for a model that returns 404 from the Hugging Face API. The CLI reports the model as not found and exits without writing any output file.
Actual behavior
A BOM file is created and written to the output path with only the minimal skeleton (component name from the scanner discovery, no HF metadata, no license, no tags). In BuildPerDiscovery and BuildFromModelIDs, when fetchers.modelAPI.Fetch(modelID) returns a 404 error, an EventError is fired but resp is set to nil and execution continues to bomBuilder.Build(bctx) with HF: nil. The BOM is built from the nil API response and appended to results, then written to disk by WriteOutputFiles.
Additional context
The UI correctly tracks t.notFound = true via the progress callback and shows the model as "not found" in the summary, but the empty BOM file is still written before the summary is printed. Fix: skip models where the API fetch returned IsNotFound(err) before calling bomBuilder.Build. A model that could not be found on HF should produce no output file.
AIBoMGen CLI version
v0.2.1
Go version (if built from source)
go1.25.x
Operating system
Any
Command used
Expected behavior
No BOM file is created for a model that returns 404 from the Hugging Face API. The CLI reports the model as not found and exits without writing any output file.
Actual behavior
A BOM file is created and written to the output path with only the minimal skeleton (component name from the scanner discovery, no HF metadata, no license, no tags). In
BuildPerDiscoveryandBuildFromModelIDs, whenfetchers.modelAPI.Fetch(modelID)returns a 404 error, anEventErroris fired butrespis set toniland execution continues tobomBuilder.Build(bctx)withHF: nil. The BOM is built from the nil API response and appended to results, then written to disk byWriteOutputFiles.Additional context
The UI correctly tracks
t.notFound = truevia the progress callback and shows the model as "not found" in the summary, but the empty BOM file is still written before the summary is printed. Fix: skip models where the API fetch returnedIsNotFound(err)before callingbomBuilder.Build. A model that could not be found on HF should produce no output file.