In terms of internal US politics, Polk really had no choice but to accept. As I once noted in soc.history.what-if,
***
When Polk got the terms of the Trist *projet* in February 1848 he did not
like what he saw--the terms reflected not the current military situation but
one of many months earlier (not to mention the irregular way they had been
arrived at). Nevertheless, even before meeting with the Cabinet, Polk
concluded that the *projet* must be accepted. It fell clearly within the
limits of the original instructions to Trist--except for Baja California and
the Tehuantepec right of transit, neither of which Polk had regarded as a
*sine qua non.* If Polk refused it, this would just seem to confirm the
charges of the Whigs (and of some Democrats) that the war had been begun and
was being continued to conquer and annex All Mexico. Moreover, the Whigs
controlled the House of Representatives, and Polk worried that they might
refuse to vote any more men or money for the war. The Army would then have to
be withdrawn, and if the Whigs came to power in the next presidential
election, even California and New Mexico might be lost. Even if the House
was willing to fund the war, continuing the war might require doing away with
the Walker Tariff's low rates and returning to Whig high-tariff policies
(which even some Democrats, especially Pennsylvanians like Buchanan and
Dallas, might favor). Most frightening of all, the Wilmot Proviso was
gaining favor among Northern Democrats, and a continuation of the war might
mean that the slavery issue would disrupt the Democratic party--and then the
Union.
Polk gathered the Cabinet together, but made it clear that whatever they
thought (and Buchanan was very unhappy) he was going to submit the treaty to
the Senate. "He would himself, he said, have preferred to acquire more
territory, *perhaps to the Sierra Madres.* [my emphasis--DT] But he doubted
whether the Mexicans would ever have agreed to this...[and] feared that the
American public, which was aware of the *projet*, would not sustain the
Administration in rejecting it." Merk, *Manifest Destiny and Mission in
American History*, p. 186.
https://groups.google.com/d/msg/soc.history.what-if/AwrP2gmozQA/eKhkkd-wwP0J