Definitely not the case with the VP candidate. That is at the discretion of the party.
However, since the president is the one who nominates the heads of the various departments, it is entirely at his discretion at the time of the nomination to whom it applies. It is not unusual at all for a candidate to say, “I’ll nominate General XYZ to be head of the DoD.” That’s entirely within their discretion. They don’t have to do so.
At the same time, they don’t have to receive the party’s nomination, either. The party can turn elsewhere.
I don’t think that the President can negotiate who will fill cabinet departments. Vice President is different since the candidate’s name goes on the ballot, and voters will get to vote on him, and thus, the selection of Vice President is properly a matter of politics.