Guided by gut sensory cues, humans and animals prefer nutritive sugars over non-caloric sweeteners, but how the gut steers such preferences remains unknown. In the intestine, neuropod cells synapse with vagal neurons to convey sugar stimuli to the brain within seconds. Here, we found that cholecystokinin (CCK)-labeled duodenal neuropod cells differentiate and transduce luminal stimuli from sweeteners and sugars to the vagus nerve using sweet taste receptors and sodium glucose transporters. The two stimulus types elicited distinct neural pathways: while sweetener stimulated purinergic neurotransmission, sugar stimulated glutamatergic neurotransmission. To probe the contribution of these cells to behavior, we developed optogenetics for the gut lumen by engineering a flexible fiberoptic. We showed that preference for sugar over sweetener in mice depends on neuropod cell glutamatergic signaling. By swiftly discerning the precise identity of nutrient stimuli, gut neuropod cells serve as the entry point to guide nutritive choices.