I think those "bottle" style generators we used back in the day are notoriously inefficient. They sure added a lot of drag. A favorite trick when I was a kid was to get in a race with somebody who had one of those mounted on their bike, pull up close enough to push the button that engaged their generator, then watch them drop behind like they had just dropped an anchor.
I was thinking of something like you are talking about, on a E-Bike build, sort of a poor man's regenerative braking. But I think I'd try to start with a generator hub. Magnets mounted on the rim of a wheel would be even more effective in producing power, I'll bet. With LED lighting, a battery to store power, and a few substantial downhill sections along the route, that would normally require braking, one might have a viable source of "free" energy.
I would expect the difficulty to be in implementing a "no resistance" mode. Seems to me that this would be with the generator coil shorted, not open, which would mean dissipating any power produced within the coils themselves, and they might not tolerate that. Anything with permanent magnets would produce some drag, I expect. A generator with a field coil wouldn't, but you'd need at least a small battery to get the system generating, although once it was producing power, that could be used to self-excite the field coil.
But, honestly, efficient LED lighting has made bike generators a solution in search of a problem. For $7, I got myself a set of lights that can fit in the palm of my hand, with internal rechargeable batteries that last me several rides between charges, recharge from a USB port, and put out far more light than any generator or battery light that I used back in the day.
https://www.ebay.com/itm/234551292577