Shimano components have part numbers on them. A rear derailleur part number would be like RD-5800.
Look on the back side. You will probably need a rag to wipe off the crud and a flashlight to see the numbers. Some are molded in the black bits and are a bit hard to read.
Some shimano parts have the same part number but they still have different specs.
On the shimano site, there are 2 version of the current 105 rear der with the same part number.
One has a 28t max cog, the other 32t. The diff would be the length of the cage. "Long cage" and "Short Cage" are relative terms, not exact measurements. They vary by brand/model/years. It is pretty obvious which is which went you see them side by side.
I put a mtb der, cog and a longer chain on my road bike when I went to ride in Colorado. That 39x32 worked pretty well for the up hills for a flatlander. I realized I only used the 39x32, the 39x28 and the 53x11. Wheeee. IMO, the road climbs aren't that steep, just long and at high altitude. Gear down and don't try to keep up with the locals who are used to the thinner air.
Cost? A cassette and chain aren't that much and you will be replacing them every couple of years anyhow. Buy the lock ring removal tool and chain whip so you can change them out yourself.