Cephalexin belongs to a group of broad-spectrum antibiotics called cephalosporin. Broad-spectrum antibiotics may reduce the efficacy of combined (progesterone + estrogen) oral contraceptives by impairing bacterial flora responsible for recycling of estrogen (ethinylestradiol) in large intestine. Therefore, the drug tends to be removed from the system more quickly.
Here is the FDA advice for management:
Additional contraceptive precaution (e.g. condom with spermicide) should be taken whilest taking a short course of broad-spectrum antibiotic and for 7 days after stopping the drug. If these 7 days run beyond the end of a packet the next packet should be started immediately without a break (or if you bcp contains inactive pills, they should be omitted, and active ones should be taken instead).
If the antibiotic treatment exceeds 3 weeks, the bacterial flora develops resistance and additional precaution becomes unnecessary. Also if u have been on a course of antibiotic for 2 weeks or more before u start a combined bcp, additional precautions are also unneccessary.
Hope this can be useful to you.