ABSTRACT Plant–herbivore interactions have been modulated by plant secondary metabolites (PSM), which exert a strong pressure on herbivore microbiome. This study examined the effects of different PSM types and concentrations on caterpillar fitness, composition of gut bacterial and fungal assemblages, and microbiome network stability and symbiotic bonds in relation to the caterpillar diet breadth. Polyphagous and monophagous caterpillars sampled from oak were reared on an artificial diet (AD) containing PSM native (tannic acid) and non-native (tannivin and salicylic acid) to oak at varying concentrations, along with control treatments (starving and fed by oak leaves or AD without PSM). Their gut microbiome was profiled using 16S and ITS2 rRNA gene metabarcoding. Contrary to expectations, the diet breadth combined with the PSM type had no effect on weight gain. The bacterial composition was shaped by PSM concentration, while caterpillar species and diet breadth had no effect. Compared with bacteria, concentration had no effect on the fungal composition, which was more influenced by diet breadth than by caterpillar species. Leaf-fed caterpillars harbored the highest microbial richness. In AD-fed caterpillars, bacteria formed more complex networks than fungi, and the complexity was simplified with higher PSM concentrations. We identified taxa significantly associated with caterpillar guts. Notably, the association Lactobacillus–Lactococcus–Streptococcus was universally present across all caterpillar species, regardless of diet breadth. Our findings emphasize the importance of considering PSM concentration and composition in understanding caterpillar–gut microbiome interactions. Further research will validate the functional roles of identified microbial taxa and their significance for caterpillar hosts. IMPORTANCE The caterpillar gut is an excellent model system for studying host–microbiome interactions, as it represents an extreme environment for microbial life that usually has low diversity and considerable variability in community composition. Our study design combines feeding caterpillars on a natural and artificial diet with controlled levels of plant secondary metabolites and uses metabarcoding and quantitative PCR to simultaneously profile bacterial and fungal assemblages, which has never been performed. Moreover, we focus on multiple caterpillar species and consider diet breadth. Contrary to many previous studies, our study suggested the functional importance of certain microbial taxa, especially bacteria, and confirmed the previously proposed lower importance of fungi for caterpillar holobiont. Our study revealed the lack of differences between monophagous and polyphagous species in the responses of microbial assemblages to plant secondary metabolites, suggesting the limited role of the microbiome in the plasticity of the herbivore diet.