SAN DIEGO — Scott Boras mentioned two “mystery teams” that had reached out to him Tuesday to discuss Gerrit Cole, and the Astros appear to be one of them.

Houston is contemplating whether it should make a late attempt to retain Cole, a source told The Post.

Such a signing would push the Astros over the second luxury-tax threshold of $228 million and perhaps even the most punitive threshold of $248 million after never having exceeded that threshold previously. But the Astros have concerns about what their rotation will look like moving forward.

Zack Greinke and Justin Verlander remain elite, but will pitch at 36 and 37 next season. Lance McCullers Jr. is returning from Tommy John surgery after missing all of the 2019 season. He can be a free agent after the 2021 season.

Forrest Whitley, once a heralded prospect, has taken steps backward. Houston likes Brandon Bielak and Cristian Javier as players who could potentially help in 2020. Cole, along with Greinke and Verlander, would make it easier to break in inexpensive pieces in the back end of the rotation.

It also would keep a strength a strength. The Astros and Nationals met in the World Series and might have had the majors’ best rotations. Washington kept its elite top three this week when it locked up Stephen Strasburg for seven years at $245 million. Strasburg will slot back in between Max Scherzer and Patrick Corbin at the top of Washington’s rotation.

Astros manager A.J. Hinch said Tuesday he has maintained contact with Cole since the completion of the season, though that communication has been more personal than professional. Just recently, Hinch said, he and Cole were “texting back and forth on a common interest that he and I shared.”

Asked whether he thought the Astros were still in contention to sign Cole, Hinch said, “ I don’t know. We’ve always maintained contact with Gerrit because of the impression that he made. … Those are some big checks being talked about around the league, and I’m not writing them. So I think he’s in a very good position to do whatever he wants.”

The Dodgers and Angels had scheduled meetings with Cole’s camp Tuesday afternoon — with Angels owner Arte Moreno continuing to be an involved presence. The Yankees still have Cole as their top offseason target.

Boras said there is a possibility the Cole deal gets done at the winter meetings.

“If this were a thermometer, I would say room temperature heading to a very hot climate,” Boras said.