When do you book your flight out of Santiago?

The question was: Does anyone have experience with waiting to book your outward journey from Santiago until you’ve arrived (or perhaps when you’re close enough to the end that you can tell when you’ll be getting there)? I’m keen to have a general plan, but would harbour hopes of walking a bit quicker….if we arrived…