The presence of gas in transmission fluid can disrupt the flow continuity, induce cavitation, and affect the transmission characteristics of the system. In this work, a gas void fraction model of gas–liquid two-phase flow in a transmission tube is established by taking ISO 4113 test oil, air, and vapor to accurately predict the occurrence, development, and end process of the cavitation zone as well as the transient change in gas void fraction. This model is based on the conservative homogeneous flow model, considering the temperature change caused by transmission fluid compression, and cavitation effects including air cavitation, vapor cavitation, and pseudo-cavitation. In this model, the pressure term is connected by the state equation of the gas–liquid mixture and can be applied to the closed hydrodynamic equations. The results show that in the pseudo-cavitation zone, the air void fraction decreases rapidly with pressure increasing, while in the transition zone from pseudo-cavitation to air cavitation, the air void fraction grows extremely faster and then increases slowly with decreasing pressure. However, in the vapor cavitation zone, the vapor void fraction rises slowly, grows rapidly, and then decreases, which is consistent with the explanation that rarefaction waves induce cavitation and compression waves reduce cavitation.