In his first season with the Brewers, Thames capped a five-run sixth with a two-run drive off reliever Robert Stephenson.
Hernan Perez had a pair of RBI triples, then homered off Stephenson leading off the sixth, and Jonathan Villar had a pair of two-run singles.
Zach Davies (2-2) allowed six hits in five scoreless innings, lowering his ERA from 8.24 to 6.57. He stranded a pair of runners in three innings.
Oliver Drake pitched a hitless sixth and Tommy Milone allowed two hits over three innings, including Adam Duvall's eighth-inning homer, for his second big league save, his first since August 2015.
Scott Feldman (1-2) gave up four runs, five hits and five walks in five innings.