The main significance of this study lies in constructing and verifying an interpretable machine learning model for predicting the possibility of spontaneous stone passage in patients with choledocholithiasis, thereby reducing unnecessary ERCP procedures. Although ERCP is an important treatment method for choledocholithiasis, it carries risks of complications such as pancreatitis, bleeding, and perforation. For patients who have spontaneously passed stones, the operation is unnecessary and may pose additional risks. The study screens out five key predictive factors: solitary stones, unexpanded common bile duct, stone diameter <8 mm, decreased ALP, and decreased GGT, using LASSO regression, which improves the simplicity and clinical applicability of the model. Furthermore, the study uses GBM model combined with SHAP analysis to enhance the model's interpretability, allowing clinicians to understand the prediction logic and overcome the "black box" problem. In addition, the study developed a web application based on R and Python, using the Dash library to implement an interactive interface, facilitating real-time clinical application and promoting the application of artificial intelligence tools in medical scenarios. Overall, this study not only improves the ability to identify spontaneous stone passage but also provides technical support for individualized diagnosis and treatment, and has important clinical transformation value.