WASHINGTON — A key inflation gauge remained high last month even as gas prices cooled in a sign that elevated costs remain a challenge for the Federal Reserve and elected officials in Washington. The Commerce Department said Wednesday that consumer prices rose 3.8 percent in October from a year earlier, up from 3.6 percent in September. On a monthly basis, consumer prices climbed 0.3 percent from September to October, down from a 0.6 percent increase the previous month. The stubbornly elevated price figures come as the economy is expanding at a healthy pace, driven by strong consumer spending and surging business investment as large tech firms splurge on building out AI infrastructure. Consumer spending has been resilient even as persistent inflation raises the costs of many necessities and has soured most Americans on the economy. Yet much of the spending is driven by upper-income households, and there are signs poorer Americans are relying more on credit to sustain their spending. Gas prices rose just 0.8 percent last month, according to the department, after surging 9.2 percent in