Does bike geometry or wheel affect maximum cog size? 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.
No the frame size doens't limit your cassette choice.  Within reason any 700c wheeled bike should take any available cassette size.
What matters most is the Derailleur's capabilities.   The maximum and minimum tooth count is a published value for each derailleur model.
Also in the stats are other useful values.
Presuming your bike is a 2017, it would have had a &quot;Shimano 105 GS&quot; rear mech.  (from https://99spokes.com/bikes/cannondale/2017/superx-105)
This might be the RD-5800-GS which is documented at https://bike.shimano.com/en-EU/product/component/105-5800/RD-5800-GS.html




Item
Value




Low sprocket_Max.
32T


Low sprocket_Min.
28T


Max. front difference
16T


Top sprocket_Max.
12T


Top sprocket_Min.
11T


Total capacity
37T




So nominally this combination would take a largest cog with 28/30/32 tooth.  The smallest is 11 or 12T, so it wouldn't work well if the little cog was a 14, and probably jamb up on a 16T.
Shimano's specs are notoriously conservative, so this combo probably runs fine on 34T but would be nominally &quot;out of spec&quot;

That said, there might be something special about your bike which the mechanic has noticed, but not come across in the text of your question.  Adding a photo might help.