Villagers don't take food I throw at them. I've tried potatoes, carrots, bread at all types of villagers, and additionally wheat and seeds at farmer villagers. They just leave it on the ground, even if they're standing on it. It stays on the ground until I pick it up or it despawns.
Steps to reproduction:
1. Find or spawn villager.
2. Throw carrots, potatoes or bread at it. (Or wheat and seeds at a farmer.)
Make sure the villager's inventory isn't full and
mobGriefing
is set to true.