Disclaimer: I'm not a lawyer nor a tax advisor
USCIS “visitor” status is not imply IRS “non-resident alien” status. IRS has what it calls Substantial Presence Test:
You will be considered a United States resident for tax purposes if you meet the substantial presence test for the calendar year. To meet this test, you must be physically present in the United States (U.S.) on at least:
- 31 days during the current year, and
- 183 days during the 3-year period that includes the current year and the 2 years immediately before that, counting:
- All the days you were present in the current year, and
- 1/3 of the days you were present in the first year before the current year, and
- 1/6 of the days you were present in the second year before the current year.
However, in you particular case, since you say that you're on G-4 visa, it would seem that you're exempt from being resident (therefore a “non-resident alien”):
An individual temporarily present in the U.S. as a foreign government-related individual under an “A” or “G” visa, other than individuals holding “A-3” or “G-5” class visas.
Being IRS “non-resident alien” might not always be a good thing, in fact you loose the posibility of using many tax decuctions and credits, ending up paying significanly higher taxes in US. On the other hand you don't pay US taxes on your income earned outside of US.