Just kidding. Or maybe not. Mine was also pretty "bipolar". I think it just comes down to essentially a wild animal, living in an unnatural way in our homes, and it's really not perfect no matter how you slice it. They have needs and wants and they can't communicate with us easily with what they need, and that leads to frustration on both sides.
Mine's been in a snit for the past week or so. He's in the middle of a heavy moult, which always makes him cranky and attacky until it subsides. Showers help a little bit, and I make sure he still has positive training sessions - I just keep my hands clear until he's back to himself again. (e.g. for training I'll offer rewards in a little cup rather than putting my fingers in biting range).
as mizzley said it’s probably just hormones. you can help with hormones by making sure you aren’t stroking his back, making sure there’s not too much fat in his diet, and making sure he doesn’t seem his cage as a “nest” . but sometimes they’re just hormonal, especially during spring, birds are very unique LMAO