Shimano Rear Derailleur Max Capacity
There is also a spec for the maximum size of a rear cog.  The 5800SS allows a 23 to 28 tooth largest cog, so you are OK.  The GS allows a range of 28 to 32 teeth for the largest cog.  I would suggest you decide based on which direction you are more likely to want to change-if you go to an 11/32 cassette you need the GS, while if you go to tighter gearing you need the SS.  These are the specified numbers and you can often make it work over a little more range.