The recommended amount of weight a woman should gain in pregnancy is built around a handful of maternal characteristics. The anchor is where she started: prepregnancy weight or BMI sets the target range, with underweight women advised to gain more and overweight women advised to gain less. So that option clearly belongs.
Two more background factors shape the picture. Socioeconomic status influences diet quality, food security, and the actual weight a woman puts on. Ethnicity feeds into body build and the population specific ranges used in guidelines. Both are standard determinants of gestational weight gain.
Smoking is different in kind. Its main effect in pregnancy is to restrict fetal growth and reduce birth weight; it is a harmful exposure, not a planning variable that the recommended maternal weight gain is calculated from. It does not feature in the list of factors that set the weight gain target, so within this question it is the exception.
Hence the factor that does not determine gestational weight gain here is smoking.
\[\boxed{\text{Smoking}}\]