The origin of the stellar Initial Mass Function (IMF) and its variation with cosmic time or with diverse environmental conditions still lack a complete physical interpretation. Observation- ally, the present-day stellar IMF appears to have an almost universal profile, characterized by a power-law at large masses and flattening below a characteristic mass of ∼ 1M⊙. Among the many proposed explanations, the origin of the characteristic stellar mass and the broad peak of the IMF are best attributed to gravitational fragmentation, which sets the mean Jeans mass at cloud fragmentation. We present the results of a self-consistent study of the response of the mean Jeans mass at cloud fragmentation to metal line-cooling, dust-cooling and the Cosmic Microwave Background (CMB) based on a semi-analytic model of the thermal evolution of clouds with varying initial metal- licities and dust contents at different redshifts. We then discuss the implications of our findings for observational samples of very metal poor stars observed in the halo of our Galaxy.