Calcium-aluminum-rich inclusions (CAIs), the oldest known solids of the solar system, show evidence for the past presence of short-lived radionuclide beryllium-10, which was likely produced by spallation during protosolar flares. While such 10Be production has hitherto been modeled at the inner edge of the protoplanetary disk, I calculate here that spallation at the disk surface may reproduce the measured 10Be/9Be ratios at larger heliocentric distances. Beryllium-10 production in the gas prior to CAI formation would dominate that in the solid. Interestingly, provided the Sun’s proton to X-ray output ratio does not decrease strongly, 10Be/9Be at the CAI condensation front would increase with time, explaining the reduced values in a (presumably early) generation of CAIs with nucleosynthetic anomalies. CAIs thus need not have formed very close to the Sun and may have condensed at 0.1–1 AU where sufficiently high temperatures originally prevailed.