GPT and diabetes mellitus: This study aims to comprehensively examine the associations between hepatic biomarkers (ALT, AST, and the ALT/AST ratio) and the development of diabetes among 50,463 Chinese adults, while also exploring the TyG index’s mediating role in these associations.