IIRC, Hagar was [happily] married to Abraham for at least 17 years (one or two for pregnancy, 13 of Yishmael before his circumcision, one for Sarah's pregnancy, and two for Itzhak's Gmilah). If it was for Hagar, Sarah could demand expelling her right after Yishmael's birth.
If for Yishmael's wickedness, why expel Hagar and why the verse puts Hagar first:
"She said to Abraham, “Cast out that slave-woman and her son, for the son of that slave shall not share in the inheritance with my son Isaac.” Genesis.21.10
when it should be reading "Cast out that boy and his mother".
From the fact that Abraham married her back and had more children with her, presumably following God's command to follow Sarah's prophecy I can infer that Hagar wasn't connected to Yishmael's wickedness.
So why would Sarah suddenly demand the expelling of Hagar?