"Who knows, it might grow up to be a theory some day!"
In that case, one is modelling a test for a hypothesis. The model won't beocme theory, the hypothesis will. In general, models are based on both theory and law.
Interesting discussion. I see models as less formal than hypotheses, so your suggestion of modeling a test for a hypothesis could certainly fit. You could probably come up with multiple models.
I see models as based on most anything; they are often vastly simplified (oversimplified) so they can work with subsets of data and provide some kind of test. They can stem from laws and theories, but are generally much simplified. If, when tested, they are supported it does not prove anything of course, but may lead to more robust, focused, or precise models, and you can build up from there.
I did modeling in my dissertation, and worked with simplified models from about five diverse fields--and they all pointed in the same direction!
Well over 20 years later we are working with better data and have refined a lot of the hypotheses, but we are still pointed in the same direction! Lots of fun.