Did Andrew have some inkling that Jesus would perform a miracle with the boy's lunch?
Why this is a valid question
This is the fourth of seven signs. Note John's emphasis on believing:
but these are written so that you may believe that Jesus is the Christ, the Son of God, and that by believing you may have life in his name.
(John 20:31, ESV)
But to all who did receive him, who believed in his name, he gave the right to become children of God, who were born, not of blood nor of the will of the flesh nor of the will of man, but of God.
(John 1:12–13, ESV)
With the first sign:
This, the first of his signs, Jesus did at Cana in Galilee, and manifested his glory. And his disciples believed in him.
(John 2:11, ESV)
With the second sign:
So Jesus said to him, “Unless you see signs and wonders you will not believe.”
(John 4:48, ESV)
See What is/was the significance of Jesus’s response regarding sign-seeking in John 4:48?
Thus, this question is consistent with the signs. Unlike the synoptic gospels, the Gospel of John mentions Philip and Andrew by name and that the fishes and loaves came from a boy.
What faith did Andrew show?
While John 6:1-15 gives no indication that he expected Jesus to perform a miracle with the boys fishes and loaves, the boy who somehow offered through Andrew the fishes and loaves is the one showing the best faith. All we have is:
One of his disciples, Andrew, Simon Peter’s brother, said to him, “There is a boy here who has five barley loaves and two fish, but what are they for so many?”
(John 6:8–9, ESV)
Andrew was sensitive enough to the boy's faith to think it worthy of telling Christ. Note the boy's faith willing to give up his food for Jesus in contrast to the crowd who followed Jesus to Capernaum.
When they found him on the other side of the sea, they said to him, “Rabbi, when did you come here?” Jesus answered them, “Truly, truly, I say to you, you are seeking me, not because you saw signs, but because you ate your fill of the loaves.
(John 6:25–26, ESV)
What we don't know is how many other apostles had the opportunity to speak up about the boy. We don't have much indication that Andrew expected a miracle. He did know Jesus valued children and seeing people show exceptional faith.
The testing wasn't for Jesus to find out about Philip. It was for Philip to find out about himself and learn from what happened.