I've been told by my current pdoc I will need to be on an antidepressant for the rest of my life unless I want to relapse into depression.
I've heard other places that four-nine months might be enough to treat the illness.
I don't think there's a concensus in the medical community, or at least one that isn't bias toward keeping us on meds. So much of our knowledge comes from sharing experiences places like this. If you're really depressed now and are having good results with a medicine, I would stick with it until you have coping skills and a plan you trust to help you stay well if you go off the meds.