Another type of USAF-type commitment you need to worry about are the commitments you get for your follow-on training (such as aircraft commander upgrade or a weapons-type school). And especially the commitment you get for a PCS (Permanent Change of Station) which moves you from one base to another. These can range anywhere from 6 months to 3 years plus...again depending how the personnel system is playng the game. Usually, they all run concurrently, whcih is great in your early years. It's the ones that start extending your "time owed" beyond the pilot training commitment that start to get your attention. It's a great position to be commitment-free and still flying...but it can be pretty difficult to get to that position.
I've seen many folks preparing their exit from the military only to get an assignment just prior to the point when they could legally put in their separation papers. Basically, they get a modern day "shanghai"...they had to take the assigment and the associated 2-year commitment that comes with it. So, the bottom line is the military wants you to work for them 24/7/365 until you get too expensive or too old. And that's the tricky part...figuring out when that is.