iphone 3gs 32gb

can anybody tell me what version the 32gb i phone comes with when you buy them from apple. i am considering buying an i phone without a contract to use on my t-mobile account and want to make sure that i am getting a phone that can be unlocked. I called apple today and they could not tell me what version it was. any help will be greatly appreciated.
It depends on how many devices the store sells. If they sell a lot you'll likely get a device with 3.1.3 on it. If they are a slow moving store you might get lucky and get something with 3.1.2.

Even if you get a device with 3.1.2, it will likely have a the new bootrom making it a tethered jailbreak ( have to re-run your jailbreak app of choice to reboot the phone to get it out of recovery ) AND if you ever get to a place where the phone NEEDS to be restored, you run the risk of having to update to 3.1.3 and losing your jailbreak and unlock.
so whats my best bet to get an iphone on my t-mobile account. Ebay?

Original thread: https://forums.imore.com/threads/iphone-3gs-32gb.188796/