The Spalart–Allmaras (SA) turbulence model is one of the most popular models applied to compressors, but it often over-predicts blockage size and hence under-predicts the stall margin. In this paper, a novel modification to the SA model is proposed to improve the prediction of compressor near-stall flows. The modification is based on the dimensionless vortical pressure gradient, which identifies blockage cells featured by 3D swirling, adverse pressure gradient, and low-momentum flows. It unblocks the compressor passage by enhancing the eddy viscosity in the identified blockage cells; whereas in canonical 2D flows the modification is automatically switched off. The model coefficients are calibrated via Bayesian inference, which considers the uncertainties involved in experiments and computational fluid dynamics (CFD) simulations of turbomachinery. The rotor exit radial profile data of NASA Rotor 67 at peak-efficiency and near-stall points are used for calibration. The calibrated model is tested extensively in four compressors covering both tip blockage and corner separation as well as both industrial and laboratory Reynolds number and Mach number. For the NASA Rotor 67 and the TUDa-GLR-OpenStage, the proposed model predicts more accurate stall margins at all operating speeds due to the tip unblocking effect. For the BUAA Stage B rotor, the proposed model predicts the tip blockage size and thus the stall margin more accurately. For the LMFA NACA65 cascade, the proposed model with the quadratic constitutive relation (QCR) achieves significant improvement in predicting the exit profiles due to the unblocking effect on the corner separation. The proposed model, termed as SA-PGω in this work, is a promising engineering tool for future Reynolds-averaged Navier–Stokes (RANS) simulations of compressor near-stall flows.