This happened when I lived in California and it was my understanding that for any potential 'third strike' (any serious crime that could be a felony) a trial was mandatory. No deal could be offered. The judge explained this very briefly and I didn't read up on it to clarify afterwards.