It’s the sensors themselves that have a limited life - the units that have a fixed battery have a battery life that exceeds the sensors useful life.
The common / low cost carbon monoxide detectors use a chemical reaction (either a fuel cell or one of a few reactions that produce a colour change in the presence of CO) - the chemistry degrades with time and exposure causing the sensitivity to drop off over time.
I’m not sure how much of a safety margin they have (like could it still detect dangerous levels at 2x it’s design life or something) but a quality generator would have a life of several times that of a CO sensor at least so replacement will definitely/hopefully be a design consideration.