Canonical models of Shimura varieties for GL2 Let $N \ge 4$ and let $Y_1(N)$ be the complex manifold $\Gamma_1(N) \backslash \mathcal{H}$, where $\Gamma_1(N) \subset \mathrm{SL}_2(\mathbf{Z})$ is the usual congruence subgroup and $\mathcal{H}$ the upper half-plane.
I know of two models of the modular curve $Y_1(N)$ as a variety over $\mathbf{Q}$: one for which $Y_1(N)$ represents the functor "elliptic curves with a point of order $N$", with the universal object being $(\mathbf{C} / (\mathbf{Z} + \mathbf{Z}\tau), 1/N)$; and another, representing the functor "elliptic curves with an embedding of $\mu_N$", with the universal object being $(\mathbf{C} / (\mathbf{Z} + \mathbf{Z}\tau), \zeta_N \mapsto 1/N)$. The difference between these has come up before, in this question, where it was established that the modular functions whose $q$-expansions are in $\mathbf{Q}[[q]]$ are in the coordinate ring of the second model, but not the first.
My question is this. Modular curves are Shimura varieties for $GL_2$; and Deligne (following Shimura) has defined a "canonical model" for Shimura varieties over the reflex field, which is $\mathbf{Q}$ here. Here "canonical" has a precise, but rather complicated, definition in terms of Galois actions on CM points.

Which open compact subgroups of $\mathrm{GL}_2(\hat{\mathbf{Z}})$ give these two models of $Y_1(N)$ as their Deligne canonical models?

I'm virtually certain that one of the two models for $Y_1(N)$ is the canonical model of level $\{ \begin{pmatrix} * & * \\ 0 & 1 \end{pmatrix} \bmod N\}$, and the other is $\{ \begin{pmatrix} 1 & * \\ 0 & * \end{pmatrix} \bmod N\}$; but I'm really struggling to find a straight answer in the literature as to which is which!
 A: This was getting too long for a comment I'll post it as an answer.
Though the set of $K$-special points on the canonical model does not depend on the choice of an embedding of $K\hookrightarrow\operatorname{GL}_{2}(\mathbb Q)$, the Galois action does depend on it in general and this dependence is encoded in a choice of involution (very concretely, are you going to embed $K$ through the basis $\{1,z\}$ or through $\{z,1\}$). If I am not mistaken, this corresponds to the general fact that an abelian variety with CM is special on the Siegel modular variety in two different ways depending on a choice of isomorphism of $\operatorname{GL}(H_1(A,\mathbb Q))\simeq\operatorname{GL}(V)$ (composed or not with an involution). Hence, the precise formulation of Shimura's reciprocity law characterizing canonical model, which you left implicit in your question, depends (slightly) on such a choice.
I think these choices of normalization are interchanged by the analytic involution you mention in comments exchanging the two complex curves. If I'm correct, determining which curve is the canonical model for which group depends on this normalization.
Now I have tried myself to write something internally coherent and 1) I found it surprisingly hard and 2) I concluded that if you normalize the fundamental theorem of complex multiplication in the usual way in terms of uniformization (by trivializing the homology of the abelian variety), then the canonical model corresponding to the choice of your second group corresponds to the moduli problem "point of order $N$" and that the canonical model corresponding to the choice of your first group corresponds to the moduli problem "embedding of $\mu_N$". As for how I checked it, I computed the action of an element of the absolute Galois group of $K$ on an Heegner point for the first moduli problem and compared the result with the fundamental theorem of CM. However, in view of point 1), I admit I worry that my computation might have been circular at some point.
