Keep in mind that most futures, equity, and index options, at least, are traded on exchanges where the counterparty risk is so tiny as to be negligible.
In general, adding extra variables like this fails to invalidate the model. For example, the fact that interest rates or volatilities are not constant just ends up leading to an extended model with extra stochastic factors (and hedges) corresponding to the extra terms.
Counterparty risk is special, however, since it moves the price in opposite directions for the two entities making the trade. That is to say, if BofA is trading an in-the-money swap with Goldman, then
- B of A thinks it should get more money because the payments Goldman promised may never materialize, but
- Goldman thinks it should pay less money because the cashflows promised by BofA may never materialize.
Contrast this with the case of stochastic interest rates, where both parties can at least theoretically come to a consensus about the effect on the value of future cashflows.
In practice, for options, only one side of this conundrum is relevant. For example if Goldman is buying an option from BofA for cash upfront, then BofA has no counterparty concerns about the deal. Goldman still wants to pay less due to the credit risk of course, while from BofA's point of view the credit risk is meaningless.
The result of all this is that counterparty risk is an unavoidable error in the model. I would not go so far as to say this risk "invalidates" it. After all even the existence of quoted spreads on the underyling theoretically "invalidates" the model.
What it does mean is that trades happen only in cases where the counterparty risk is roughly the size of the option's bid/offer spread, or less. Any more risk than that and BofA will be unwilling to accept such a large haircut, and Goldman will take its business elsewhere.
A common way to reduce the risk all around is in the use of margin accounts. For example, Goldman obviously cares little about the BofA counterparty risk if the option looks valueless. If the option becomes valuable, then Goldman can demand that BofA keep some money on deposit as a guarantee they will make good on the payments. So long as any bankruptcy by BofA is sufficiently slow to evolve, the margin account updates will have grown to entirely cover the option value by the time default actually occurs.
The margin accounts are the reason exchanges are willing to let members sell options, despite the obviously greater risk of any individual member's default.