Despite their name, lithium-ion batteries don’t contain lithium metal and therefore any fires should be dealt with media which will extinguish the fire and help cool the battery. For example Class ABC or BC fire extinguishers or water for small quantities or a fixed system (e.g. sprinklers, water mist or gaseous extinguishing system) for larger quantities.
On the other hand lithium batteries are a class D fire risk (flammable metal) and need an extinguishant which has been specifically designed for that risk. For example Class D powder fire extinguisher. Water should not be used on lithium battery.