I don't know the actual mechanism involved, but in my Model 3 the lights will engage when I let off the accelerator and regenerative braking takes over. It also makes the distinction of a light deceleration (like coasting in an ICE) as opposed to a stronger one. I imagine Rivian will do something similar.
I too donāt know, but the part of the system that is commanding the motor control to go into regen could also command the brake lights to come on when the level of regen requested exceeds some level.
From a Functional Safety point of view though, it would be easier to argue the safety goal of ābrake lights come on when deceleration exceeds some levelā is met when itās performed by a function that is separate from the function doing the braking. Doing this based on an accelerometer (actually two of them in order to be able to compare the output to detect faults in either one) would be an appropriate mechanism in my view.
If a Tesla vehicle decelerates at more than a threshold rate the brake lights come on. Teslas have accelerometers and that is the probable source of the signal but obviously regen current could be used alternatively or in combination with the accelerometer reading. I assume Rivian does something similar.