I believe most of the WRT54G series routers differ in
- RAM capacity
- flash capacity
- wireless chipset
So if you can find out all three from an information page you could deduce what router model you are working with. I don't have a Tomato-based router here to test and tell you where to go exactly.
You probably could find out the chipset by telneting/SSHing into the device and performing an
lsmod - look for a driver for the wifi. RAM capacity can be figured out with a simple
free command, and flash capacity can be easily deduced with
mount. Assuming the utilites are there in the Tomato build.
Not sure if the chipset is terribly important if Tomato is already working on it. Flash capacity is going to be the attribute that is important, because if you flash a firmware that is too big you'll need physical access to recover.