It was an F-22 that could obviously tell whether or not it was shooting down a commercial airliner.
F22 (and the F35) are optimized for beyond visual range air-to-air combat, so I am not sure if the pilot visually sees the thing before firing.
In all three cases, the pilots have visually confirmed the objects were unmanned. The order to fire has come after that confirmation.