Metabolic model for diversity-generating biosynthesis