The objectives of the present study were: (1) to evaluate the importance of genotype×production environment interaction for the genetic evaluation of birth weight (BW) and weaning weight (WW) in a population of composite beef cattle in Brazil, and (2) to investigate the importance of sire×contemporary group interaction (S×CG) to model G×E and improve the accuracy of prediction in routine genetic evaluations of this population. Analyses were performed with one, two (favorable and unfavorable) or three (favorable, intermediate, unfavorable) different definitions of production environments. Thus, BW and WW records of animals in a favorable environment were assigned to either trait 1, in an intermediate environment to trait 2 or in an unfavorable environment to trait 3. The (co)variance components were estimated using Gibbs sampling in single-, bi- or three-trait animal models according to the definition of number of production environments. In general, the estimates of genetic parameters for BW and WW were similar between environments. The additive genetic correlations between production environments were close to unity for BW; however, when examining the highest posterior density intervals, the correlation between favorable and unfavorable environments reached a value of only 0.70, a fact that may lead to changes in the ranking of sires across environments. The posterior mean genetic correlation between direct effects was 0.63 in favorable and unfavorable environments for WW. When S×CG was included in two- or three-trait analyses, all direct genetic correlations were close to unity, suggesting that there was no evidence of a genotype×production environment interaction. Furthermore, the model including S×CG contributed to prevent overestimation of the accuracy of breeding values of sires, provided a lower error of prediction for both direct and maternal breeding values, lower squared bias, residual variance and deviance information criterion than the model omitting S×CG. Thus, the model that included S×CG can therefore be considered the best model on the basis of these criteria. The genotype×production environment interaction should not be neglected in the genetic evaluation of BW and WW in the present population of beef cattle. The inclusion of S×CG in the model is a feasible and plausible alternative to model the effects of G×E in the genetic evaluations.