This is difficult to answer because it's done so automatically....,but I think what I do is the recognize the interval but immediately mentally add in the sharp or flat based on the key signature. So the reading of the stave is based on the pure interval with an immediate adjustment based on the signature. I know my mind does not think ' ah, this was a third but is no longer a third based on the key signature or the accidental'.