8:03 PM ET

Sources told Jeff Passan on Thursday that Carlos Rodon is in agreement with the New York Yankees.

After opting out of a contract with the Giants, Rodon was the top pitcher on the market. He pitched a career-high 178 starts in his career and was 14-8 with a 2.88ERA. He was named to the All-Star team for the second year in a row.

Rodon battled injuries in the first portion of his career before undergoing Tommy John surgery. He had a 2.37 earned run average over 24 starts in the year 2021. Over the last two months of the season, he never pitched more than five hours.

Rodon signed a two-year deal with the Giants after the White Sox didn't tender him a contract in the off-season. He exercised in November.

Rodon is in the Yankees rotation which ranked fourth in the country in last year's pitchers' rankings. The Yankees were eliminated from the playoffs by the Astros in the second half of the season.

The signing, which was first reported by the New York Post, is the latest for agent Scott Boras. Carlos Correa is one of the deals he has for his clients.

Cole's $324 million deal is the second- largest contract the Yankees have ever given a pitcher. CC Sabathia's deal with the Yankees was more expensive than Rodon's.

The Yankees have guaranteed $522 million in contracts this season, between Rodon and Judge, who signed nine-year, $360 million deals to stay with the team.

The New York Yankees will host the San Francisco Giants on opening day in 2023.