Traffic engineering (TE) in large-scale computer networks can address the scalability issue of traditional TE algorithms.TELGEN is a novel TE algorithm that achieves superior generalizability across diverse network conditions.It transforms the problem of predicting the optimal TE solution into predicting the optimal TE algorithm.TELGEN achieved less than 3% optimality gap and reduced solving time by up to 84% compared to classical optimal solvers.