Many insects forage on toxic plants and store the toxins in their bodies to render themselves unpalatable to predators; the best-known example is the Monarch butterfly, the caterpillars of which subsist on milkweed, so that when the butterfly is eaten by a (naive) bird, the bird will vomit and receive negative conditioning not to dine on the species again.
Now there's a report of a caterpillar that dines on toxic plants only when it needs to do so to kill or inhibit wasp eggs implanted in its body. It's the familiar-to-every-child "wooly bear." When a parasitic wasp lays eggs inside the caterpillar's body, the caterpillar changes its dietary preference to favor plants that harbor pyrrolizidine alkaloids (borage, heliotrope, ragwort, and many others):
These [plants] have no nutritional value and they clearly come at a cost, for woolly bears that eat a PA-rich diet grow more slowly than their peers. And yet, infected caterpillars gulp down these poisons by the leaf-ful. They are the medicine that the caterpillar uses to kill its unwanted hitchhikers.Much more at the Not Exactly Rocket Science link.
Addendum: while blogging about these caterpillars, I came across this abstract about a potential human health threat from consuming honey derived from the families of plants that produce these hepatotoxic alkaloids:
Following scientific risk assessments, several countries have imposed strict regulations on herbal medicines containing 1,2-dehydro-pyrrolizidine alkaloids. Using published data on the plants used in honey production, pyrrolizidine alkaloid-containing plants are shown in this review to represent a significant source of honey worldwide. This observation, honey consumption data, reported levels of pyrrolizidine alkaloids in honeys, and consideration of tolerable exposure levels determined for pyrrolizidine alkaloids in herbal medicines, leads to the conclusion that some honey is a potential threat to health, especially for infants and fetuses, and further investigation is warranted.Photo credit here.