I got a used Cannondale Super X 105 during the winter and when I was getting it ready for the summer, I couldn't index the rear derailleur properly. It wouldn't shift to the largest cog and shifting to the smallest cog was iffy. I took it in to a bike shop to get it looked at (full tune-up while at it) and the feedback was that the cassette (11/34 I think) was too big for the bike and the derailleur was too small (plus bent cage which I suspected). Tried to see if I could keep the cassette and get a larger derailleur but the mechanic insisted the cassette is not right and would need replacement. Maximum I'd be able to put on would be a 30T.
I've searched online to see if frame size limits your maximum cog size but couldn't find anything. So now I'm wondering if he was simply assuming I would want a same for same replacement of the bent derailleur. I already spent almost $200 replacing all bearings and BB (total blindside there) which was what I had budgeted for the drive train so I don't want to spend money I don't have to.