It is software setting. Example - if 20% brake pedal press OR accelerator pedal release, generate 150 amps of current (there is actually a map corresponding to complete pedal position). This AMOUNT of current generation is actually hindrance to vehicle's kinetic energy i.e. regenerative braking. This 150 can be adjusted against say 20% (change the map) which you will see as more or less aggressive regenerative braking.
The map is dynamic, because regeneration (motors acting as generators) causes motors to heat as well so according to temperature of motors & battery, map OR cooling flow is adjusted.
Any regeneration above hardware's capability will require new hardware so Tesla can play with software as far as it is under motor's capability.
Wish I can explain it better if you have any further doubts