When dealing with Lithium-ion battery fires, water-based extinguishers will provide essential cooling effect, but they are not able to form a thermal barrier around the fire. When you run out of water/foam, you’ve run out of fire suppressing power. The battery forms its own flammable gases (including oxygen) and heat, and will re-ignite, burning until the cell fully discharges its energy.
Foam is designed to smother with a film on the surface of the fire, but the film will not survive the high temperatures reached in a Li-ion fire. The same applies to Wet Chemical.
Powder is completely ineffective, as it has no cooling effect, and will not cling to vertical surfaces of the cell. Please note that Lithium-ion battery fires are NOT Class D fires.
The Lithium-ion Battery Safety Range contain Aqueous Vermiculite Dispersion (AVD), a revolutionary fire extinguishing agent designed to stop Li-ion battery fires fast.
AVD is, in brief, Vermiculite particles suspended in water, discharged in a fine mist to provide both cooling effects and form a heat-proof barrier around the burning battery cell to prevent propagation and re-ignition. Vermiculite has very strong thermal insulation properties and therefore prevents heat transfer from the burning cell to its surroundings. This means the chemical reaction is contained inside a heatproof cell so that external flames can be dealt with by the cooling effect of the water.
A Lithium-ion battery fire is not a Class D fire risk
Fire extinguisher types and classes
Here's a useful guide on choosing the right class of fire extinguishers for the appropriate application and scenario.