Here is a scenario without Santa Anna, or any of his lackeys (Salas or Paredes) in power at any point during the war. And where Mexico manages to keep it together granted I think this )is the best Mexico can do (almost bordering ASB) without the Oregon dispute also exploding into war against Britain at the same time (something that is very unlikely). Anyway enjoy:
Basically Paredes never stages a coup against Herrera. IOTL Herrera, who had previously deposed Santa Anna and exiled him in Cuba, was willing to meet American and British ambassadors to prevent the war or at least get favorable terms favorable to Mexico. Even if he didn't avoid the war the important thing is that he was willing to receive the ambassadors (something no one else did). It was Paredes who then declared war on the US.
So Paredes remains in the north, patrolling the border with a lot more men. Like IOTL Mexican troops at cross the Rio Grande, to the defend the Nueces Strip. Even if Herrera is negotiating there are a lot more Mexican troops present which makes the US somewhat nervous the Texans and Taylors troops stationed in Corpus Christi (north of the Nueces) also grow uneasy.
Like in OTL skirmishes around the Nueces Strip provoke the war. However this time around Polk announces "American blood on American soil" and gets congress to declare war on Mexico before Mexico does. This time Herrera had been in Mexico City receiving the British ambassador and unlike Paredes who hastily declared war. The US is seen as the aggressor.
With more troops in the north Monterey holds. Zachary Talyors "armistice" lasts longer and Alamonte is able to defend Saltillo, and move to El Paso from there. There is actual fighting in El Paso although Kearny's forces defeat the Mexican garrison the loss is large enough that he is unable to continue to California.
Meanwhile Santa Anna makes it out of Cuba with Atocha's help and heads to Veracruz. This time though no one is expecting him and he gets arrested.
Scott begins his invasion of the Mexican heartland via Veracruz. Like IOTL he takes the port and advances towards Puebla. Herrera sacks Farias out of the treasury and puts a conservative in there. The archbishop stays loyal to Herrera and Puebla actually fights (IOTL it declared neutrality the American's where able to camp there as they made their way to Mex City). The battle of Puebla is one of the bloodiest in the war although an American victory it severely stalls Scott's advance. Furthermore American troops are constantly raided by thieves and gangs. One particular gang led by Manuel Dominguez practically cripples most of Scott's army before they reach cuernrvaca. (IOTL Scott's alliance with the bishop allowed him to employ Dominguez and form the Mexican Spy company, without Puebla's neutrality he doesn't have the time to rally the company to his side Dominguez and his men mostly sack and steal from the Americans instead).
In the North Taylor finally takes Monterrey but cornered at La Angostura by where his forces are defeated in a decisive Mexican victory. The defeat seriously lowers American morale while boosting the Mexican. Alamonte's troops amange to retake Monterey later on. Taylor is forced North of the Grande/Bravo.
News reach washington and Polk begins to feel pressure to call for peace, the talks with Britain regarding Oregon are also not going as smoothly as he hoped (there is no chance of war but with the US declaring war first and earlier Britain is more weary or American expansion). In California Fremont & Stockton face an uprising by Flores (without help from central Mexico) and actually prevent Los Angles and more importantly San Diego from being taken. American forces remain in Central California.
Also Polk's term is about to end (all advances in this war have been slower than OTL's even if the war started a few month earlier its been going on for a few extra months). And while Mexican morale is at a high point Herrera begins to feel the pressure of Scott's army at the footsteps of Mexico City, the economic strain of the blockade at Veracruz and discontent from the American occupation in Puebla. Herrera offers terms to the Americans: Straight line from San Fran Bay to the Rio Grande/Bravo from there follow the river to El Paso and link it to the Nueces. The Nueces Strip is to remain Mexican.
The Polk administration outraged by Herrera's terms. After all American forces are in possession of the Nueces Strip and at Mexico's City's door. However Polk grows more and more unpopular as the war goes on and his term draws to an end. Neither the war nor the negotiations advance much in the following moths. Polk promised only one term and the Democrats are soundly defeated in the election by the pro peace Whigs. The next Whig President (take your pick) signs the peace with Herrera's terms but with the Eastern part of the Nueces Strip (east of Laredo) ending up in American hands. Britain mediates the "Treaty of Havana."
Herrera ends up growing a dictator very much ala Santa Anna in the following years. He ends up being deposed when it is clear he has betrayed most of his liberal ideologies but he is still not conservative enough for the conservatives. There is a "mini civil war" (not the bloody War of Reforma of OTL) but his successor Comonfort, a liberal manages to restore the 1824 constitution and actually ends up serving his term in the presidency without being reelected and accepting his defeat to conservative Zuluaga. Zuluaga denounces what is left of the extreme conservatives who want a monarchy bringing a sense of legitimacy to his party. He is reelected but steps off (grudgingly) after two terms when the liberal Lerdo de Tejada is elected.
In the US tensions between north and south continue to rise, the North blames on the South wanting to expand slavery and its failure in a southern president and southern generals. The South feels cheated and is furious at the fact that only Northern territory was won, that they ended with a smaller Texas than what was annexed and that a Northern president arranged an unfair peace. Texas feels cheated since it is smaller than when it was an "free and independent republic" It takes less than a decade (somewhere in the midlate 1850s) for the states in the South to secede and for Texas to follow suit (yeah its more disorganized than OTLs no "confederacy"). The US crumbles into Civil War, longer and bloodier than OTL's (the north still wins but it looses Texas where many southerners end up relocating).
Much later Texas and Mexico go to war. and Mexcio gains the remainder of the Nueces Strip. (Texas has to end up independent otherwise it aint a Mexican "victory")
Quick sketch of map & borders.