Chooks tend to spread food around a lot with their feet and beaks, so no matter how well contained it is (we use rodent-proof feeders that rely on the chooks weight to open), food will end up on the ground, and in times of a high rodent population, such as now around here, mice and rats will arrive to take advantage of the free feed.
The good news is that chooks like to eat mice and rats
However, they are unlikely to catch them most of the time, the rodents are just too fast, so you need to trap them. We don't use any toxic baits, no matter how well contained- since if the mice or rats eat then go elsewhere to die, the chooks may well eat them, and die or get very sick. We've had good success with an electronic rodent trap- they go in for a feed, and get electrocuted. I then throw them to the chooks, who chase each other around until one eventually gets to eat the mouse.
Most rats are a bit too big for them to swallow, so they generally get left and become fly-blown (and stink a bit, but they are ~50m from the house, in the cherry orchard), and then the chooks eat the maggots.