Examples of random() in custom distribution?

Yes.

I changed this behavior in Improve sample_ppc by junpenglao · Pull Request #3053 · pymc-devs/pymc · GitHub. I think it makes more sense, see discussion here: Sample_ppc shape - #2 by junpenglao