The feast at the wedding in Cana testifies that Mary believed in Jesus, for it was she who told them to do whatever he said, knowing and believing that He was about to astonish them. Take care when you discuss Mary the Mother of Jesus. Science tells us that a Mother carries cells from her children who have gestated in her womb ... and these cells are there for the rest of her life barring a radical hysterectomy.
I don't read anything in the text that indicates that she knew how Jesus was going to deal with the situation.
Another possibility is that the wedding was for Mary's family and that somehow she was involved in providing the food. When the wine ran out, since Joseph is not mentioned much after Jesus' twelfth birthday and one can conclude that he died, Mary would have logically gone to Jesus as He was the oldest son. For all we know, and all the text implies, she could have just expected Him to send them out to buy more.
We know a miracle is coming because we have the advantage of hindsight. Looking at it from the perspective of being there, as it happened, there is no indicator that anyone knew a miracle was forthcoming.
?