The latest ones.
All models currently on sale will run iOS7, future version maybe not though I think they will all see through iOS8 (though with limitations).
What dictates it?, the chip and what it can handle and if Apple have a new key feature on newer models which they want on only certain models in order to sell newer models.