It sounds like you need to know the kind of sunfish, there are a variety of larger to smaller ones. The smaller ones, might, maybe, most likely, would not bother fish bigger than it. But would eat fry and most likely the smaller mosquito fish.
But also, unless you have both of the same sex beware!
Sunfish are extremely productive, with each female producing an average of 80,000 eggs per year from several successive spawns.
Many are carnivorous and prey upon small fishes, while others that live in the shelter of weed beds consume mostly aquatic insects and larvae.
Most of the sunfishes are quite aggressive in their behavior toward other fishes and, in many instances, toward their own kind. They are opportunistic foragers, always on the alert for a drifting, helpless fish or insects to devour. Most sunfishes are very alert to terrestrial insects or other food items falling on the water surface and will instantly rush to the scene with the first arrival engulfing the food.