there's never been a solid timeline or time limitation given that I'm aware of. But it's fairly safe to assume if I may, that around 2 weeks to a month might be the maximum.
I know that Verizon for instance only kept text messages for around two weeks.
AT&t for instance keeps text records for 5 to 7 years but not the actual context of the message.
basically if you had not already saved or backed up those text messages they're most likely gone.
Oh man, the only way I can think of retrieving them is using some kind of 3rd party messaging back-up application. You would have needed to install and set it up prior to deleting them, but T-Mobile doesn't have a message retrieval service.