TyG index mediates 40.25% (95% CI: 31.13-43.52%) of the total effect of ALT on diabetes risk, establishing its substantial contribution to this pathway. Here, GPT is linked to diabetes mellitus.