I wish there was a clear answer to give you.
Whenever you are asked to make a commitment, you have to weigh your options. Because no one can know the future, there's no particularly clear way to go at it. With any negotiation, you need to look at what the conditions are for both sides of the equation.
Looking in general the re-location question from any company's perspective:
Realize that for most companies, if they can keep a keep a team or an employee in a lower-cost part of the world, where salaries and facility expenses are lower, they will. There is no motivation here to pay you more, pay relocation, and pay for space in a more expensive (in this case US) facility, if they can get the same work done at a cheaper price elsewhere in the world.
Places where relocation becomes a viable option is when the company will get bigger value out of hiring someone remote and moving them than they do out of the local labor in that region or keeping the skilled person in a remote location. So... If you have the right skills for the right company at the right time, this is the opportunity you're looking for. But when considering between opportunities, think hardest about the likelihood of being relocated in terms of what the company gets out of it.
In general, know the labor pool - both where you are and where you are looking for an opportunity. These days, for example, the US economoy is not booming like crazy, so in many US locations, there's a pretty great pool of labor to draw from, if you need local talent. And because the economy has been problematic for a few years, many people have been self-educating to improve job prospects, as well. That said, there are certain booming regions that are still having a hard time locating the right talent, and companies in those places are likely to be your best prospects. This is about the best info you can have when trying to decide what commitments to keep.
In terms of the 6 month commitment, realize that the company is in the process of making the decision between:
Option A - an employee who is likely to leave if he gets the right opportunity, but who knows the company, the world and has a proven skill set.
Option B - another employee (new or already hired) who doesn't know the work as well as you do, but who will make the 6 month commitment.
In a 6 month project with a serious learning curve - having an employee leave 3 months in can be absolutely fatal. I can understand why they are asking, and your best bet - as with the relocation question - is to understand your competition. Are you the one guy who can do this work? Are there other good prospects that the company can fall back on? How hard is it to replace you?
If you are easy to replace, you don't have a lot of leverage here. If you are by far and away the best person for the job, you may be able to set your own terms and refuse to commit or offer a compromise, like promising to do you utmost in the event of a handoff being required.
A key element here is really knowing where you stand with respect to your job performance. In almost any case, knowing how valued you are in the company will tell you a great deal about how far you can push it to get what you want. Everything's a negotiation, and usually hiring and firing decisions are not made on the basis of a single yes or no answer. That said, there can be times in a company's existence where absolute need will push a decision to retain or fire employees due a particular set of business conditions.
In any negotiation, each party is going to decide what to do based on what it gets out of the trade, and what it has to give up. For you - it's your job, your professional reputation and the ability to take a future opportunity. For the company - it's getting work done, at a certain cost, with a certain level of quality/efficiency.