Farming intensity and landscape heterogeneity influence agrobiodiversity and associated ecological functions. The relative contributions of these agroecosystem components to agricultural production remain unclear because of inter-relations and weather-dependant variations. Using a structural equation modelling approach, we estimated direct and indirect contributions of farming intensity (soil management, pesticide use and fertilisation) and landscape heterogeneity (of semi-natural covers and crop mosaic) to cereal crop production, in 54 fields (mostly wheat), in two years (24 and 30 fields). Indirect effects were evaluated through agrobiodiversity (carabid and plant communities) and ecological functions (pollination and pest control). In 2016, farming intensity had the largest direct positive effect on cereal crop yield, followed by agrobiodiversity (74% of the farming intensity impact) and ecological functions. However, the direct benefits of farming intensity were halved due to negative indirect effects, as farming intensity negatively affected within-field biodiversity and ecological functions. Overall, agrobiodiversity and farming intensity had equal net contributions to cereal crop yields, while heterogeneity of the crop mosaic enhanced biodiversity. In 2017, neither higher farming intensity nor agrobiodiversity and ecological functions could lift cereal production, which suffered from unfavourable meteorological conditions. Semi-natural habitats supported agrobiodiversity. Our study suggests that a reduction of farming intensity combined with higher heterogeneity of crop mosaic can enhance the benefits of ecological functions towards crop production. Semi-natural covers seem to play an essential role in the face of climatic events, by supporting agrobiodiversity and the potential resilience of the agroecosystem functioning.