We develop a coarse-grained stochastic model for the influence of signal relay on the collective behavior of migrating Dictyostelium discoideum cells. In the experiment, cells display a range of collective migration patterns, including uncorrelated motion, formation of partially localized streams, and clumping, depending on the type of cell and the strength of the external, linear concentration gradient of the signaling molecule cyclic adenosine monophosphate (cAMP). From our model, we find that the pattern of migration can be quantitatively described by the competition of two processes, the secretion rate of cAMP by the cells and the degradation rate of cAMP in the gradient chamber. Model simulations are compared to experiments for a wide range of strengths of an external linear-gradient signal. With degradation, the model secreting cells form streams and efficiently transverse the gradient, but without degradation, we find that model secreting cells form clumps without streaming. This indicates that the observed effective collective migration in streams requires not only signal relay but also degradation of the signal. In addition, our model allows us to detect and quantify precursors of correlated motion, even when cells do not exhibit obvious streaming.