I have been searching for the same info, but cannot find anything.
So having bought on eBay what I though was the correct part, today I decided to drill out the rivets & see if I could sort the metal gear. It's a bit small to attempt on my press, and not sure if the two gears actually come apart. The plastic cogs inside the gearbox are fine.
Pic 1 is what 99% of sellers are showing online.
Pics 2 & 3 are what is actually fitted to the sunroof motor.
Solved the clicking when closed or fully open. There is no cut off switch, when you reinstall there is a procedure in RAVE to make sure the tilt then stop and then slide back work OK.
Yes eventually figured that out after getting the motor apart. There wasn't room to get anything between the two, so I used a large nut on one side for support, and small nut against the stub. Then pressed them apart in the vice.
Motor re-assembled using self taps, but after a while the metal cog popped out a bit & disengaged with the cables. Suspect it's loose in the plastic inside, which did have some cracks in it . Guess it's either motor replacement time or seal the glass shut & unplug everything !!.