* server: return 400 for repos with no supported model files
Log 4xx at WARNING in the catch-all error handler and keep ERROR for 5xx.
* server: return 400 for invalid or oversized collection manifests
* server: return 400 for a collection manifest with a non-string recipe
json::value() throws a type error when recipe is not a string, which the
route reported as a 500. Check the type first, in a helper so the manifest
shape has unit tests.
* server: keep the error handler's log levels as they were
* fix: show all local model versions in one folder
List different GGUF versions, such as Q4 and Q8, from the same local model folder as separate choices.
Keep the old folder name working for existing scripts, and keep sharded models and mmproj vision files grouped correctly.
* Fix extra model folder review issues
Show split extra model folders as variant models only, while keeping the old folder name working in requests. Also handle folders with multiple sharded variants and always pick the same mmproj file.
* fix(server): don't let one extra model folder overwrite another
Two folders with the same GGUF filenames produced the same model id, so
the one read second replaced the first. Models now go through
add_extra_model(), which never overwrites: a clashing name gets its
folder name added.
Adds a regression test.
* fix(server): only group GGUF files that are really parts of one model
Files were grouped by the quantization tag in their name, so
Model-Q4_K_M.gguf and Model-Q4_K_M-imatrix.gguf looked like two halves
of one split model and one became unreachable.
Files now group only when their names say they belong to the same split
set. Same code backs the registry variant list, so that changes too.
Adds a regression test and updates Extra-Models-Dir-Spec.md.
* fix(server): sort GGUF variants by quant token, not display name
Names widen to file stems when two variants share a quant, but sorting
still looked the name up in the quant priority table. Widened names miss,
fall into the unranked bucket, and Q8_0 sorts ahead of Q4_K_M — so
`pull --yes` picked the wrong default. Track the quant separately on
GgufVariant and sort on it; names stay widened for unique selection.
Add test/cpp/test_hf_variants.cpp (HfVariantsTest) covering the
Q4 + Q4-imatrix + Q8 case; it fails against the previous comparator.
* Enable CI for HfVariantsTest in CMakeLists
---------
Co-authored-by: Andi M <[email protected]>
Co-authored-by: fl0rianr <[email protected]>