Television playing with a flouncing fairy gay stereotype, in the right way, has been acceptable in the gay community for decades. 1977's "Three's Company" featured a straight actor (John Ritter) pretending to be a lisping limp-wristed gay man (so that he could move into an apartment with two attractive women). The jokes were made at the expense of the homophobic landlord who was the only person stupid enough to think all gay men really act that way. Quotes from sitcomsonline:
Joyce Dewitt on the gay community: I had no idea that the gay
community would come out in such support of our show and enjoy it.
[...]
its producers say they received no complaints from gays about Jack's silly charade
Then in 1998 popular (with the gay community, I think) TV show "Will&Grace" featured a gay actor (Sean Hayes) playing another exaggerated gay stereotype character (Jack) in a positive way. He was the fun one, compared to his uptight partly-closeted gay best friend Will. The two sometimes argued about whether Jack was perpetuating a negative stereotype, with Jack usually winning.
So family guy has Jasper -- Brian's gay cousin (who is also a talking bipedal dog) playing into the stereotype. That's safe since Will&Grace proved you can show some gay men act like that some of the time, but it's not the only way (Family Guy's main gay character is a quiet guy, Bruce, who's gayness doesn't define him). Peter's gay-gene silliness is safe since Three's Company proved "this is how stupid people think gay men act" works.