Is it possible to model \phi(w_1,w_2,...,w_t) for each t with a hyperprior of some sorts that depends on priors of w_1,…,w_n and sums upto 1 (after multiplying with lambda)? If so then I assume this could be achieved via
https://www.pymc.io/projects/docs/en/stable/api/distributions/generated/pymc.Mixture.html
If however not and you need to define your custom distribution, then there is the CustomDist class which you may try to use. An example of it can be found here (which uses the approach of defining the logp for the custom dist which might be what you need here):
as well as other examples here
https://www.pymc.io/projects/docs/en/stable/api/distributions/generated/pymc.CustomDist.html