The Knicks were thrilled J.R. Smith accepted a four-year, $24.5 million guaranteed deal last July, offering him the most they could under the Early-Bird exception.

It was surprising hours later that Smith, coming off Sixth Man of the Year honors, came back to the Knicks and said he changed his mind. The flaky shooting guard wanted a three-year deal with an opt-out after two seasons to maximize his value.

That Smith opt-out next June looms large now as Knicks president Phil Jackson eyes his hefty cap space in 2015 to add more marquee players alongside Carmelo Anthony. Anthony agreed not to take his 7.5 percent pay raise in Year Two of his new deal, giving the Knicks $1.4 million more to play with.

Smith’s opt-out decision could greatly impact the Knicks’ future championship plans, increasing the amount of cap space they would have.

Smith had an inconsistent season, an awful start partly because he played tentatively after last summer’s knee surgery.

If Smith has a bounce-back season, he could be just cocky enough to opt out of the last year of his deal that would pay him $6.4 million.