Catalyzes the NAD(P)H-dependent reduction of ketopantoate into pantoic acid. Prefers NADH rather than NADPH as the electron donor. (R)-pantoate + NAD(+) = 2-dehydropantoate + H(+) + NADH (R)-pantoate + NADP(+) = 2-dehydropantoate + H(+) + NADPH Regulated by feedback inhibition by coenzyme A (CoA). CoA acts by competing with NAD(P)H (PubMed:23941541, PubMed:26757028). A disulfide bond is formed between CoA and Cys-84, which indicates an irreversible inhibition upon binding of CoA (PubMed:26757028). kcat is 23.1 sec(-1) toward ketopantoate (in the presence of NADH). kcat is 19.7 sec(-1) toward NADH. kcat is 2.22 sec(-1) toward NADPH. Optimum pH is 6.4. Optimum temperature is 90 degrees Celsius. Is extremely thermostable. Cofactor biosynthesis; coenzyme A biosynthesis. Homodimer. Cooperative binding of CoA and ketopantoate induces a closed inhibited state by interacting with the N-terminal and C-terminal domains, and seems to facilitate the disulfide bond formation. Disruption of the gene results in a strain with growth defects that are complemented by addition of pantoate. Belongs to the ketopantoate reductase family.