San Francisco Giants left-hander Robbie Ray did not opt out of the remaining two years and $50 million on his contract, sources told ESPN.

Ray, 33, returned from Tommy John surgery this year and made seven starts, posting a 4.70 ERA while striking out 43, walking 15 and allowing six home runs in 30⅔ innings. His season ended after a hamstring strain in late August sent him to the injured list.

The Giants acquired Ray in a trade with the Seattle Mariners, who had signed him to a five-year, $115 million free agent contract following his American League Cy Young Award-winning 2021 season. Over his 11-year career, Ray is 77-73 with a 3.98 ERA and 1,548 strikeouts, 535 walks and 194 home runs allowed in 1,258.2 innings.

Ray will rejoin a rotation that includes ace Logan Webb and left-hander Kyle Harrison -- and question marks beyond that. Right-handers Hayden Birdsong, Keaton Winn, Mason Black and Landon Roupp all took turns starting this year, and right-hander Jordan Hicks vacillated between the rotation and bullpen. Left-hander Carson Whisenhunt, the Giants' top starting-pitching prospect, could be in the mix as well.

San Francisco fired president of baseball operations Farhan Zaidi following an 80-82 season and replaced him with longtime Giants star Buster Posey. With a projected payroll in the $150 million range, the Giants are expected to pursue starting-pitching help in free agency and could be in the market for Corbin Burnes, the best available starter.