All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
After investigation, we have not come across this story in the books of the Sunnah; some scholars related it, but we do not know if they had taken it from the Israa'eeliyyaat (the body of narratives originating from Jewish and Christian traditions) or not.
Hayaat Al-Hayawaan Al-Kubra, authored by Ad-Dumayri reads:
“Benefit: Al-Qushayri said, ‘It was said that Prophet Sulaymaan (Solomon), may Allah exalt his mention, asked his Lord, the Almighty, to authorize him to invite and feed all the animals one day, so Allah permitted him to do so. So Sulaymaan started gathering food for a long time, then Allah sent him one fish from the sea, and it ate everything that Sulaymaan had been gathering for a long time. Then the fish asked Sulaymaan for more food, and Sulaymaan said, ‘I have nothing left,’ and he asked the fish, ‘Do you eat the same thing every day?’ The fish said, ‘My sustenance is three times this much every day, but Allah did not feed me today except what you have given me; I wish that you did not invite me as I stayed hungry today because I was your guest.’’”
Nuzhat Al-Majaalis wa Muntakhab An-Nafaa-'is, authored by Shaykh Abdur-Rahmaan ibn Abdus-Salaam as-Saffoori, reads:
“Story: Sulaymaan, may Allah exalt his mention, said to an ant, ‘What is your sustenance every year?’ The ant said, ‘A grain of wheat.’ So Sulaymaan, may Allah exalt his mention, confined it in a bottle and put with it a grain of wheat. After one year had passed, he found that it ate only half of the grain, so he asked the ant about this and it replied, ‘I was relying on Allah prior to my confinement to a bottle and after I was confined, my reliance was upon you, so I was afraid that you would forget me, hence I saved half of the grain for the next year.’ So Sulaymaan asked his Lord to invite all the animals one day. He gathered much food and Allah sent a fish and it ate all the food at once. The fish said to Sulaymaan, ‘I am still hungry.’ Sulaymaan asked, ‘Is your food every day more than this?’ The fish said, ‘Much more than this.’”
Allah knows best.