I know it's slightly offtopic, but the brand I am using - ExposureLights - offers a battery diagnosis/replacement service for their bicycle lights.
Those are on the expensive side, but still, most brands would rather sell you a new one.