Organisms are subject to a host of physical forces that influence morphological evolution. Birds, for instance, use their bills as implements to perform various functions, each exerting unique physical demands and selective influences on bill morphology. For example, birds that use their bills to excavate nesting or roosting cavities must resist a range of mechanical stresses to prevent fracture. However, the contribution of bill geometry and material composition to excavation stress resistance remains poorly understood. Here, we study the biomechanical consequences of bill diversification in two clades of cavity-excavating, frugivorous birds, the paleotropical barbets. Using multilayered finite element models and beam theory, we compare the excavation performance of different maxillary geometries for two loading regimes experienced by barbet bills during cavity excavation- dorsoventral impact and torsion. We find that deeper and wider maxillae perform better for impact loads than for torsional loads, with the converse for narrower maxillae. This results in a tradeoff between impact and torsion resistance imposed by bill geometry. Analytical beam models validate this prediction, showing that this relationship holds even when maxillae are simplified to solid elliptical beams. Finally, we find that composite bill structures broadly exhibit lower stresses than homogenous structures of the same geometry, indicating a functional synergy between the keratinous rhamphotheca and bony layers of the bill. Overall, our findings demonstrate the strong link between morphological evolution, behavior, and functional performance in organisms.