No, they cannot fire you for being bipolar that would be discrimination, but if you are showing manic symptoms and are unsafe, they can escalate the situation and if they deem you to be a danger to yourself or others, they can term you for that I believe or at least I’ve heard of it happening before
like I don’t know what my life looks like six months from now. my mother (the only parent I could stay with, dad is a drug addict) straight up told me I can’t stay with her. There is no family and no friends that can put me up. So I’m desperately trying to find something before the end of my program