Question: "What's the record for the longest time a deep space craft has functioned without a reboot?".
Source: This Pioneer 10 webpage from NASA says:
"Pioneer 10: first probe to leave the inner solar system & precursor to Juno
July 15, 2017 by Chris Gebhardt
The first spacecraft to leave the inner solar system sailed into the asteroid belt 45 years ago today, 15 July 1972, on a mission that would mark many “firsts” for NASA’s exploration of the solar system. Pioneer 10, the first outer solar system mission, became the first probe not only to leave the inner solar system, but also the first probe to be launched on an escape trajectory from the solar system and the first craft to visit the planet Jupiter. Today".
and
"Unlike the previous Pioneer probes, Pioneers 10 and 11 were specifically designed for exploration of the outer solar system, with enhanced communications systems and hardened radiation shielding to protect their instruments and systems from the damaging radiation fields they would encounter at Jupiter.".
and
"On 6 November 1973, while still 25 million km (15.5 million miles) from Jupiter, direct observations of the Jovian system began.".
and
"By 29 November [1973], Pioneer 10 was still operating flawlessly as its instruments collected data point after data point and image after image of Jupiter.".
and
"On 3 December, the radiation began to take its toll on Pioneer 10, with the spacecraft generating several false commands.
Thankfully, Pioneer 10’s controllers had prepared for just such a contingency, and most of the false commands were able to be countermanded by contingency commands to the spacecraft.
However, the radiation-induced false commands did result in the loss of one image of Io and several close-ups of Jupiter.".
and
"The final signal received from Pioneer 10 arrived on Earth through the Deep Space Network on 23 January 2003 from a distance of ~82.2 AU.
All further attempts to contact the spacecraft were unsuccessful, with the final attempt made on 4 March 2006 – 34 years and 1 day after the craft left Earth on its historic mission.
Today, Pioneer 10 – assuming it hasn’t collided with anything – is ~118.5 AU from the sun and is travelling outward at 2.54 AU per year.
It is currently the second farthest human-made object from the sun – a position it will hold until April 2019 when Voyager 2 overtakes it.".
Answer: Pioneer 10 worked flawlessly until it had "false commands [that] were able to be countermanded by contingency commands", it operated (with power) for almost 31 years (until 23 January 2003), and continues travel to deep space 45 1/2 years later. Nothing in NASA's article mentions shutdown, sleep, or a reboot - since it no longer has power a reboot is impossible.
So, 31 or technically (the answer, as the question is written), 45 1/2 years. The "function" of Pioneer 10 after it looses power is to transport the Systems Diagram, so it's still functioning (until it crashes).

My understanding is that the decades old Voyager probes have multiple computers, some of which have not been rebooted; but I don't have an authoritative source.