Revert "server: add model capabilities to the list endpoint (#10174)" (#11004)

This reverts commit 0943001193.
This commit is contained in:
Jeffrey Morgan
2025-06-06 23:29:14 -04:00
committed by GitHub
parent a8ed68bd93
commit 09d308d6b6
3 changed files with 19 additions and 37 deletions

View File

@@ -929,7 +929,8 @@ func (s *Server) ListHandler(c *gin.Context) {
}
}
r := api.ListModelResponse{
// tag should never be masked
models = append(models, api.ListModelResponse{
Model: n.DisplayShortest(),
Name: n.DisplayShortest(),
Size: m.Size(),
@@ -942,16 +943,7 @@ func (s *Server) ListHandler(c *gin.Context) {
ParameterSize: cf.ModelType,
QuantizationLevel: cf.FileType,
},
}
model, err := GetModel(n.String())
if err != nil {
slog.Warn("bad model details", "name", n, "error", err)
} else {
r.Capabilities = model.Capabilities()
}
models = append(models, r)
})
}
slices.SortStableFunc(models, func(i, j api.ListModelResponse) int {