We use the semi-analytic model ( SAM ) of galaxy formation and evolution sag coupled with the multidark simulation MDPL2 to study the evolution of the stellar mass-gas metallicity relation of galaxies ( MZR ) . We test several implementations of the dependence of the mass loading due to supernovae ( SNe ) . We find that no evolution in the normalization of the MZR is obtained unless we introduce an explicit scaling of the reheated and ejected mass with redshift as ( 1 + z ) ^ { \beta } . The latter is in agreement with results from the FIRE simulations , and it should encompass small scale properties of the interstellar medium varying over time , which are not captured in SAMs , as well as other energy sources in addition to SNe . Increasing \beta leads to stronger evolution of the MZR normalization ; \beta = 1.9 reproduces the observed MZR in the range 0 < z < 3.5 . A stronger redshift dependence of outflows reduces the levels of star formation at earlier epochs with the consequent decrease of metal production . This leads to a slower increase of the gas metallicity compared to the stellar mass build-up . The cold gas can be contaminated either by receiving a direct injection of the material recycled by stellar winds and SNe or by gas cooling . The relative role of each process for a given stellar mass depends on the criterion adopted to regulate the fate of the recycled material . However , modifying the metal loading of the outflows has mild impact on the zero-point evolution and does not affect our conclusions .