1. When you hire a company , interview each team member. A the end of the day your experience will mostly depand from real people you buy rather then a company which sells them.
2. Start from fixed cost, promicing dedicated team if you plan it.
3. Ask for SLA. If the company doesn't have SLA, ask them to make it for you.
If you know how to draft SLA - good. If you dont' you can get it by asking vendor what can go wrong, and where it can happen you will be not satisfied, and how would they propose to descrbe and mitigate this risk in SLA.
Or better work with a company which can do reasonable SLA, not only chanting "we need to trust each oher", "we have good references "(of course, everyone has, that's because they are still in business, but it doesn't mean much) an "just give us a chance and we will show we have best engeneirs".
Your main goal. if you selected a company to motivate them best people they have access to. As the same company can provide you different level of a team, basing on expectations of risks and rewards they expect from you as a client. You should find a way to get maximum what they can give you.
P.S. If you are on a selling side (didn't get it fist)- make these SLAs, and you will look different from those created bad reputation of offshore companies.