Replace O2 sensors and fix wiring fault in loom on firewall behind Pax side cylinder head. There is a wiring earth link for the O2 sensors in there that needs soldering for a perfect connection.
Something of interest from chiptorque
Hot Tip for ECOTEC V6 : early VT V8 : Gen III Engines
by Lachlan Riddel,
Technical Director
The most common failure ChipTorque sees in Ecotec engined vehicles is a faulty / degrading Air Flow Meter (often called a MAF or AFM). This can cause substantially leaner fuel mixtures than commanded and often problems with engine detonation. If you are unsure, contact ChipTorque for advice on testing procedures.
Do not use modified (ported / billet) AFM's with the Ecotec engine without a custom programmed performance chip. ChipTorque’s R&D team has seen many Ecotec engines running dangerously lean and displaying extreme engine detonation (even with knock sensors) when fitted with modified AFM’s.
REASONS: As the frequency based AFM ages in service, the frequency output signal degrades. The Factory ECU sees this as less air entering the engine. It therefore calculates a smaller fuel requirement and the engine runs leaner!!!!! Often dramatically leaner and may even run more ignition advance as well. Sadly, the easiest test for such an occurrence is to substitute a known good (or new) AFM and recheck the mixtures and power on the dyno. If a standard 'Chip' is in the ECU and a correctly operating AFM is installed, you should see approximately 11:1 Air Fuel Ratio (AFR) regardless of what exhaust mods etc are fitted. Contact ChipTorque with the model and chip type for AFR figures with our performance chip fitted.
Aftermarket AFM’s: The common Aftermarket AFM modifications that ChipTorque see involve either porting the original AFM body and removing the 'honeycomb' screen or fitting billet sections of a similar nature to the original AFM electronics. This type of change has the same effect as a degraded AFM described above. We have seen these used on GenIII and Ecotec engines. They will only work correctly if the 'Chip' is changed to suit the changed airflow measurement properties.