The product of this enzyme, tetrahydrobiopterin (BH-4), is an essential cofactor for phenylalanine, tyrosine, and tryptophan hydroxylases. 5,6,7,8-tetrahydropteridine + NAD(+) = 6,7-dihydropteridine + H(+) + NADH 5,6,7,8-tetrahydropteridine + NADP(+) = 6,7-dihydropteridine + H(+) + NADPH Homodimer. Belongs to the short-chain dehydrogenases/reductases (SDR) family.