Genetically modified non-human animals comprising a human or humanized interleukin-7 (IL-7) gene. Cells, embryos, and non-human animals comprising a human or humanized IL-7 gene. Rodents that express human or humanized IL-7 protein. Genetically modified mice that comprise a human or humanized IL-7-encoding gene in their germline, wherein the human or humanized IL-7-encoding gene is under control of endogenous mouse IL-7 regulatory sequences.