warranty info for the model s:
An additional warranty covers the battery and varies by capacity. The 40 kWh battery is covered for 8 years or 100,000 miles, and 60 kWh battery is covered for 8 years or 125,000 miles, whichever comes first in both cases. The largest battery, 85 kWh, is covered for eight years and unlimited miles.
prepaid battery replacement option:
A Battery Replacement Option will be available for purchase soon. The option allows you to pre-purchase a new battery to be installed after eight years for a fixed price: $8,000 for 40 kWh batteries, $10,000 for 60 kWh batteries, and $12,000 for 85 kWh batteries.