There are some places that can repair it for at least $8,000 if it's not under warranty, such as 057tech.com or Recell-ev.com. Tesla usually costs several thousand more for a repair, and more than that for a brand new main pack. I hope these costs will come down considerably soon, like toward or under $1,000 for a main battery repair service. Of course the best thing is for the batteries to actually last beyond 1 million miles as Tesla has publicly stated that goal. Even so, there will probably be some cases (hopefully highly infrequent) where repairs will be needed for some vehicles.