  Solar evolutionary models are thus far unable to reproduce spectroscopic,
helioseismic, and neutrino constraints consistently, resulting in the so-called
solar modeling problem. In parallel, planet formation models predict that the
evolving composition of the protosolar disk and, thus, of the gas accreted by
the proto-Sun must have been variable. We show that solar evolutionary models
that include a realistic planet formation scenario lead to an increased core
metallicity of up to 5%, implying that accurate neutrino flux measurements are
sensitive to the initial stages of the formation of the Solar System. Models
with homogeneous accretion match neutrino constraints to no better than
2.7$\sigma$. In contrast, accretion with a variable composition due to planet
formation processes, leading to metal-poor accretion of the last $\sim$4% of
the young Sun's total mass, yields solar models within 1.3$\sigma$ of all
neutrino constraints. We thus demonstrate that in addition to increased
opacities at the base of the convective envelope, the formation history of the
Solar System constitutes a key element in resolving the current crisis of solar
models.
