The school noted on its Web site the contract includes an annual rollover provision, and will pay the 53-year-old Riley a guaranteed base salary of $850,000 in the first year.
It also includes several contingencies that could push his total compensation in the first year to an estimated $1.25 million.
In seven seasons at Corvallis, Riley has an overall record of 38-34.
"We've done some very good things at Oregon State over the last few years and this is another sign of the commitment this university has to not only the football program, but the entire athletics department," Riley said. "I want to stress that this contract is as much about rewarding our talented group of assistant coaches as it is me."
Last season, the Beavers were 10-4, including a 39-38 victory over Missouri in the Sun Bowl.
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend