Let $N \ge 4$ and let $Y_1(N)$ be the complex manifold $\Gamma_1(N)$, where $\Gamma_1(N) \subset \mathrm{SL}_2(\mathbf{Z})$ is the usual congruence subgroup.

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!

notthe canonical model, because the Galois action on the connected components differs by a sign from the one on p109 of Milne's Shimura Varieties notes.) $\endgroup$ – David Loeffler Apr 23 '17 at 20:33