TITLE: Non-abelian class field theory and  fundamental groups
QUESTION [62 upvotes]: Over the years, I've been somewhat in the habit of asking questions in this vein to experts in the Langlands programme. 
As is well known, given an algebraic number field $K$, they propose to replace the reciprocity map 
$$A_K^\*/K^*\rightarrow Gal(K^{ab}/K)$$ of abelian class field theory by a correspondence between the $n$-dimensional representations $\rho$ of $Gal(\bar{K}/K)$ and certain automorphic representations $\pi_{\rho}$ of $GL_n(A_K)$. (We'll skip the Weil group business for this discussion.) Substantial arithmetic information is carried on either side by the $L$-functions, which are supposed to be equal.
This involves  deep and beautiful mathematics whenever something can be proved, and there are many applications, such as the Sato-Tate conjecture or this recent paper of Chenevier and Clozel:
http://www.math.polytechnique.fr/~chenevier/articles/galoisQautodual2.pdf
(I mention this one because it is in some ways very close to the point of this question.)
However, there are elementary consequences of abelian class field theory that seem not to have obvious non-abelian analogues. The one I wish to mention today has to do with the fundamental group. Given a number field $K$ (assume it's totally imaginary to avoid some silly issues), how can we tell if it has non-trivial abelian unramified extensions? Class field theory says we can look at the class group, which is quite computable in principle, and even in practice for small discriminants. But now, suppose we go on to ask the non-abelian question:  which number fields have $$\pi_1(Spec(O_K))=0?$$ That is to say, when does $K$ have no unramified extension at all, abelian or not? As far as I know, there is no easy answer to this question. Niranjan Ramachandran has pointed out that there are at least ten examples, $K=\mathbb{Q}$ (oops, that's real) and $K$ an imaginary quadratic field of class number one. I know of no others. Of course I would be happy to collect some more, if someone else has them lying around. 
But the question I really wanted to ask is: Suppose  we are in a Langlands paradise where everything reasonably conjectured by the programme is a theorem. Does this give a way to algorithmically (as we run over fields $K$) resolve this question  as in the abelian case? Otherwise, is there a sensible refinement of the usual formulation that would subsume such applications?
Added: 
I'm embarrassed to admit I hadn't followed the question mentioned by David Hansen (even after commenting on it). Thanks to David for pointing it out. Of course my main question still stands. I've changed the title following Andy Putman's suggestion. The original title evolved from a (humorously) provocative version that I normally use only among friends who already know I'm a Langlands fan: 'What is the Langlands programme good for?'
Regarding jnewton's very natural thought: in addition to other difficulties, one would also need to bound $n$.

Added, 13 July:
Here is one more remark concerning jnewton's suggestion.  Of course in the realm of classical holomorphic
cusp forms, there are infinitely many of level one. More generally, it is shown in the paper 
http://www.math.uchicago.edu/~swshin/Plancherel.pdf
that whenever $G$ is a split reductive group over $\mathbb{Q}$, there are infinitely many cuspidal automorphic
representations  that are unramified everywhere and belong to the discrete series at $\infty$. (I presume there are other results of this sort. This one I just happen to know from a talk
last Fall.) According to Clozel's conjecture as you might find in
http://seven.ihes.fr/IHES/Scientifique/asie/textes/Clozel-juil06.pdf
(conjecture (2.1)), algebraic ones among them should correspond to motivic Galois representations (after we choose a representation
of the dual group)*. 
I don't have the expertise to recognize algebraicity in such constructions, in addition to the danger that I'm misunderstanding
 something  more elementary. But it seems to me quite a task to show directly that there are none corresponding to Artin representations. (The only case I could do myself is the classical one.)
Now, I would like very much to be corrected on all this.
But such families do seem to indicate that  a 'purely automorphic' approach to
the the $\pi_1$ question is somewhat unlikely, at least within the current framework of the Langlands correspondence. 
I suppose I'm sabotaging my own question.

*Note that in  these situations, the
 Galois representations don't have to be unramified, since there is the choice of a coefficient field $\mathbb{Q}_p$. In general, they should only be crystalline at $p$.

Added 14 July:
Matthew: Since I didn't really expect a complete answer to my question, if you could write your extremely informative series of comments as an answer,  I will accept it. (Barring the highly unlikely possibility that someone will write something better between the time you submit your answer and the time I look at it.)

REPLY [31 votes]: I'm going to take the step of disagreeing slightly 
with the perspective offered in Professor Emerton's answer,
in a bold attempt to prise away the green for myself.
The question is, what does the Langlands program have to say about
the finiteness (or otherwise) of $\pi_1(\mathcal{O}_K)$?
Let's first revisit what one knows by ``classical'' methods.
Minkowski proved that if $K$ is an extension of degree $n$, then
$$\sqrt{|\Delta_K|} \ge \left(\frac{\pi}{4}\right)^{r_2} \frac{n^n}{n!},$$
which, asymptotically, implies that the root discriminant
$\delta_K = |\Delta_K|^{1/n}$ is at least $e^2 \pi/4 - \epsilon$ 
for large $n$, and in particular, that $|\Delta_K| > 1$
if $n > 1$. This is purely a geometry of numbers argument.
What does the Langlands program have to say about this question?
First, let me ask a related question: what does the Langlands program say about
elliptic curves $E/\mathbb{Q}$ with good reduction everywhere? 
In this case, it implies (and is known, by Wiles!)
that there exists a classical cuspidal modular
form 
$$f \in S_2(\Gamma_0(1)).$$
 The latter group vanishes, and so $E$
does not exist. Yet this latter fact seemingly requires an actual computation
- namely, that $X_0(1)$ has genus zero. This could be tricky if one wants
to replace $E$ by an abelian variety $A$ of (varying)
dimension $g$, or replace $\mathbb{Q}$ by another
field $F$. It turns out, however, that one can show that $f$ does not exist
purely from the existence of the relevant functional equation - more
on this later.
Let us return to our original question. Suppose we have a field
$K$ unramified everywhere over $\mathbb{Q}$. It has been suggested
that one should ponder the existence of algebraic automorphic forms $\pi$
for $\mathrm{GL}_n/\mathbb{Q}$ associated to
irreducible Artin representations $\rho$ of 
$\mathrm{Gal}(K/\mathbb{Q})$. However, it is more natural
to consider the regular representation. 
In this case, it is (of course) known by Hecke that 
$\zeta_K(s)$ has a meromorphic continuation that is entire away from
$s = 1$, and, moreover, that $\zeta_K(s)$ satisfies a functional
equation of a precise type. 
Now, purely given the existence of the functional equation for
$\zeta_K(s)$, Odlyzko gives a formula(!) for $\log |\Delta_K|$
as some function of $s$ involving the roots of $\zeta_K$ 
(the function is (obviously) constant, but is not obviously constant).
One then deduces a lower bound for
$\delta_K$ of the form $2 \pi e^{\gamma} - \epsilon$, which is
better than Minkowski's estimate. (Odlyzko's method can be refined
to give better bounds.)
What is easy to miss in this argument is
that role that the Langlands conjecture plays in this argument -
 in this case the theorem of Hecke - is already
known! One might claim that this argument uses "more" than
Langlands and ask for an argument that is purely algebraic and
geometric (and here by "one", I mean Brian Conrad or
Chevalley), but I think this is a little misguided. After all, I
think it would be hard to prove that there does not exist any
Maass form for $\mathrm{SL}_2(\mathbb{Z})$ of eigenvalue
$1/4$ without using some analysis.
Can one argue similarly to see that there are no abelian varieties
$A$ with good reduction everywhere? Indeed, Mestre gave such
an argument (before Fontaine!). Namely, if $A$ is an abelian variety,
and $L(A,s)$ is automorphic in the expected sense, then $A$ has
conductor at least $10^{g}$. Moreover, this is close to optimal
($X_0(11)^g$ has conductor $11^g$).
There are other arguments along these lines.
Stephen Miller (and Fermigier independently)
 proves that there
are no cusp forms
for $\mathrm{SL}_n(\mathbb{Z})$
of "weight zero" (cohomological with the same infinitesimal character as the trivial representation) and "level one" for all $n$ in the range $2 \ldots 23$ - another generalization
of the fact that $X_0(1)$ has genus zero - using Rankin--Selberg
L-functions. 
Here is a final reason why one should expect some analysis.
All of these arguments fundamentally require the discriminant
of $K$ to be small. Any ``algebraic''  method should be
expected to work more generally. Yet consider the question of whether
 $\pi_1(\mathcal{O}_K)$ is finite when $\delta_K$
is large.  The only known method for answering this question
is producing an unramified extension $L/K$ such that the GS-inequality
applies to
$\pi_1(\mathcal{O}_L)$. The question on whether these groups
are (always?) infinite when $\delta_K$ is sufficiently large is
wildly open, and I know no good heuristics on this question.