Lithium fire is difficult to extinguish, mainly because of the way lithium reacts with water. Immediately upon contact with water, lithium produces hydrogen gas and lithium-hydroxide. If you’re into chemical equations, it looks something like this:
2Li + 2H₂O → 2LiOH + H₂
Lithium-hydroxide isn’t typically threatening. Overexposure can cause skin irritation or eye damage, but these aren’t major concerns to a fire-fighter dousing a lithium-ion battery fire, especially considering lithium-hydroxide is water soluble. The hydrogen gas, however, is a significant obstacle due to its extreme flammability. Because lithium reacts with water to create a flammable gas, pouring water on a lithium fire is often counterproductive and very, very dangerous. In the instance of a leaking lithium-ion battery, exposure to air or moisture can even produce hydrofluoric acid, which is highly toxic, and can severely irritate the eyes and lungs. Furthermore, lithium floats in water due to its low density, so smothering or submerging a lithium fire can be troublesome.
Halon extinguisher is probably best option to extinguish the fire.
https://cellblockfcs.com/why-is-a-lithium-fire-worse-than-a-regular-fire/