The proper offer to Leonard (or Butler) is a 4-year max deal with a player option after year 1.
This lets the player get the best of both worlds -- long-term security as well as the opportunity to re-enter free agency next year when the cap spikes. Spurs or Bulls probably match that as well, but it's a nasty offer to match.
The following year, offer a 5-year deal with a player option after year 2. This allows the player to get a new max deal in summer of 2018 when the new CBA has kicked in, and at which point the Celtics would have Bird rights. It means long-term commitment from the player isn't guaranteed, but it gets him in the door, which hopefully is enough to keep him when he realizes how great Boston is to play in.