First question that comes to mind, isn't how many KW you need to make it profitable. With free energy you're already more or less profitable even with a lower hash rate.
The question is how many KW of free energy can it reliably supply and does it have battery backup.
If you're exclusively using solar to power it, expect it to black-out as the sun doesn't always shine.
Once you have a baseline for the amount of power available then you could use one of the many profitability calculators and work out which miner's are likely to return the highest profitability.
Almost certainly that'll be one of the newer Bitmain Antminer S21 series, depending on hash rate and type they're anywhere from around 3500-5500KW each at hash rates of 200T-470T though getting one is like finding chickens teeth.
So you may have to think lower performance and older models, but realistically it hinges on how much power is continuously available.
I run a small rig 6TH/s from solar. Its on a timer and monitor system so it only runs when there's enough spare energy from the panels to meet the house needs and the extra for the mining rig. But it doesnt run 24/7