The length of the mission is currently set for 23 months to achieve mission success, but it could be extended just like the Mars Exploration Rovers.  They had a prime mission of 90 days but Opportunity is still operating over 8 years later.  -VM