It's been rumored for months, and now it looks like it's a done deal -- Randy Jackson is leaving the American Idol judges table to be a mentor.

Sources tell TMZ show producers aren't entirely comfortable with the arrangement, but they do feel with all of the other original judges long gone, Randy is the "glue" that holds the show together.

Those same sources say Nicki Minaj's deal to take Randy's seat is 99 percent done. They're apparently looking for someone from the country world to take the third chair alongside her and Mariah Carey -- Keith Urban's name has been popping up -- and they're going to add a fourth judge.

Meanwhile, the New York Post reports the hang-up in Nicki's deal is that her tour is sponsored by Pepsi, but Coke is the official drink of American Idol.'

Source: TMZ, New York Post