diff --git a/server/routes.go b/server/routes.go index 4121483e..c4c0f6a9 100644 --- a/server/routes.go +++ b/server/routes.go @@ -732,6 +732,11 @@ func (s *Server) ListModelsHandler(c *gin.Context) { } n := model.ParseNameFromFilepath(rel) + if !n.IsValid() { + slog.Info("invalid model filepath", "path", rel) + return nil + } + m, err := ParseNamedManifest(n) if err != nil { return err