Good solvents are:
Warm water and a liquid soap like Greased Lightning. (Read the label and be careful. Some cleaners like Simply Green will ATTACK aluminum and/or some finishes).
Common paint thinner is very good. (Watch it, it's flammable).
One of the "Dunk-It" type gun cleaners/lubricant systems work very well.
Hoppe's #9 works well. (Note that no ultrasonic cleaner will do a really good job on bore fouling. For that you need soak time and brushing. You have to still clean the bore as normal).
By putting an inch of water in the bottom of the tank, you can sit small glass or plastic beakers in the tank and use more flammable solutions like lacquer thinner or Acetone. The water will pass the ultrasonic waves through the beakers.
This is great for small assembled trigger units and bolts.
(Again, this is VERY flammable, but the beakers allow use of small quantities).
There are commercial gun cleaning solutions sold by ultrasonic makers like L&R.
It's more expensive, but commercial watch and clock cleaning solutions and rinses are very good.
With most of these, you use the cleaner to clean, but you have to use the rinse to remove the cleaner. These solutions last a long time even when they look fairly dirty.
In all cases, after cleaning and rinsing you MUST apply a coat of rust preventing lube on EVERY SURFACE.
The ultrasonic waves will remove ALL lubricant including from tiny holes and crevices that normal cleaning can't reach.
Test the cleaner and rinses carefully before using. Ultrasonics will remove most painted-on sight high-lites and safety dots.
Any chemical that will attack something, will attack it FASTER in an ultrasonic cleaner.
Watch out for some finishes, plastics, luminous sights, and aluminum.
Don't put the items to be cleaned on the bottom of the tank, ultrasonics work better if the parts are on a grate, hung from wires, or in a basket.
You can speed things up by pulling parts out and brushing.
KEEP YOUR FINGERS OUT OF THE TANK.
Ultrasonics and bone marrow don't play nice together. This isn't instant, it's over time.
But if you have to use your hands to pull something out.... Turn the tank off FIRST.