Should game companions be smart or a little flawed?

i keep running into this in games with AI companions: the moment they start playing too well, they stop feeling like a character and start feeling like an efficiency tool.

maybe i’m weird, but a companion who makes believable mistakes sometimes feels more memorable than one who always picks the optimal move. where do people land on that tradeoff in actual play?