I've had two kids and biked until the end (including after the due date with #1) with both, not just for transportation, but also exercise (had to switch to my husbands bike shorts and jerseys) both on road and off (but nothing really crazy of course). I also towed my toddler in a trailer while very pregnant. The limiting factor was usually how long I could go without a bathroom, not anything to do with biking itself. But I am a fairly experienced cyclist (former racer). It gets awkward (have to avoid belly with knees) at some point, though it depends on the pregnancy. My first baby was small and second was big, but for some reason it was less awkward biking at the end with #2.
I don't know if I would have done that in NYC. I used to bike a lot in traffic in and around Boston, and there were certain parts of my commute that were a little dangerous, but I was younger and less risk averse then. I think it depends a lot on your route, what the bike lane situation is, what traffic is like (and how fast it is), and your comfort level. While pregnant I was mostly (but not entirely) on bike paths and trails ( because we chose to live where we do because of its bikability). If I had been pregnant in Boston, not sure what I would have done. Possibly found a longer but safer route, or possibly commuted with public transport and biked in safer places for fun.
One other person I know who biked while pregnant (another former racer) stopped around 5 months (it was winter in Boston, so I think her reasons were safety), but she taught a spinning class in the 3rd trimester. A couple others (again former racers) have continued longer in big cities though probably not quite as long as I did. I did hear that one fell at one point and had to go the hospital to get checked out as a precaution.