Is it legal if K9 jumps through an opening to access the interior of the vehicle while sniffing a vehicle?

Probably. It depends on whether LE facilitated the entry of the K9 through the window. If the window was left open by an occupant, and the K9 enters solely because K9 is following the scent, this should not be a violation. See US v. Pierce (3rd Cir. 2010) 622 F.3d 209; K9 first alerted on passenger door and then jumped in the open window and alerted inside the car. However, if LE opens the door or facilitates the entry of K9, courts have held that is a violation of the Fourth Amendment. United States v. Thomas (9th Cir.201) 726 F.3d 1086; handler at the border noticed K9 showing interest in pickup. Pickup directed to secondary search. During sniff, PSD showed interest in a tool box in the bed of the pickup and jumped up and put his paws on the tool box as handler was directing K9 by using his hand. This search was only saved by the good faith exception; otherwise, the court would have ruled it an unconstitutional trespass or physical intrusion based on United States v. Jones (2012) 565 U.S. 400, where LE placed a GPS tracker on a car parked in a public place. The Supreme Court held this was a trespass on the vehicle itself and therefore an unconstitutional search. Also, in United States v. Winningham (10th Cir. 1998) 140 F.3d 1328, LE left a door open and when handler arrived, he told K9 to search, dropping its leash and K9 immediately jumped into van. Court held this was an invalid search because LE left the door open, not the occupant(s) of the vehicle.