Probably an intake manifold vacuum leak with the additional possibility of a tired upstream O2 sensor on the firewall side.

The rough running condition plus the P0171 code are very strong indicators of the vacuum leak.

The P1131 may be due to the vacuum leak.

I would address the intake first, reset everything, then see if the P1131 comes back before replacing the sensor. OTOH, if the O2 sensors are original, I'd probably replace them anyway as a maintenance item.

Steve


98 Contour SE Sport 2.5 Duratec ATX The wifey's car 89 Taurus SHO - 246K miles 94 SHO ATX - 190K 1997 F-150 5.4L ATX - The Workhorse 150K. ANY THREAD WITH "OMG" or "WTF" ETC IN THE TITLE WILL BE IGNORED!