Congressional leaders have reached a tentative budget deal with the White House in a breakthrough that would set government funding levels for the next two years and extend the nation's debt limit through 2017, avoiding routine talks of a government shutdown.

The 144-page bipartisan funding bill, labeled a "discussion draft," was posted online just before midnight Monday setting up a potential vote in the House as early as Wednesday.

If approved, the agreement would be a milestone after years of gridlock and annual threats of government shutdowns.

“It’s a solid agreement and I told my colleagues there isn't any reason that any member should vote against this,” Speaker John Boehner told reporters following a closed door meeting Tuesday of the House Republican conference.

The outgoing speaker — who is set to resign from Congress at the end of the week — knew he would see “bricks flying from those who don’t like the fact there is a bipartisan agreement” but wanted to be sure to help set up a more conducive situation for his replacement.

“I didn't want (Rep. Paul Ryan) to walk into a dirty barn full of you know what,” Boehner said Tuesday morning. “So I have done my best to try and clean it up.”

This deal would push budget negotiations and debt limit talks past 2016 would immensely helping Ryan, the likely next speaker of the House, who is expected to be elected this week.

Putting off future fights regarding government funding until 2017 would allow Ryan the ability to get a handle on the position and the conference before having to chart a path forward. It was Ryan — along with Sen. Patty Murray, D-Washington — back in December 2013 that negotiated the last budget compromise.

On Tuesday morning Ryan told NBC News "I haven't even seen this agreement so I'm going to reserve judgment until I can actually see something on paper."

However, he said he feels "this process stinks."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"We should have been discussing this months ago as members so that we have a more coherent strategy," Ryan said. "So in the future, we need a better process than the one that's working if we want to do the people's business that way."

Boehner noted the process to get this agreement did stink and hopes “the process in the future would have a little more length to it and involve more members.”

Government funding is set to expire on December 11th, while the debt limit deadline is November 3rd, according to the Treasury Department.

The bill would set spending levels through September of 2017 in an effort to return to the regular government funding process, a deal aides say would raise the spending caps set in place in 2011 that would result in deep cuts to both defense and non-defense spending, called sequestration.

This deal would provide $80 billion in sequester relief — $50 billion the first year and $30 billion in the second equally divided between defense and non-defense spending.

"We'd like to settle the topline for both years so that next year we could have a regular appropriations process," Senate Majority Leader Mitch McConnell, R-Kentucky, told reporters on September 29th.

The deal is likely going to need Democratic votes to pass the House, but some moderate Republicans, defense hawks and appropriators will likely find many parts of the deal to their liking. The bipartisan agreement would include long-term entitlement reforms to the Social Security Disability Insurance (SSDI) program — the first major reform to Social Security since 1983.

It also prevents a spike in Medicare B premiums for millions of seniors, a source familiar with the negotiations said. House Democratic Leader Nancy Pelosi, D-California, has been advocating for a change to this program.

Sen. John McCain, R-Arizona, who chairs the Senate Armed Services Committee said that while the increase in defense spending was not enough, he feels he could likely support the deal.

“I think it’s saleable, my concern is defense,” McCain told reporters Monday evening, “I think that we could move forward with this, it averts a shutdown, it puts any of these problems into two years from now, so I think it’s the best deal we can get.”

The Senate is currently scheduled to finish a cyber-security bill on Tuesday evening, and McConnell's office says the rest of the week has been left open so that they can consider a possible raise in the debt limit, a budget deal, or both.

White House Press Secretary Josh Earnest said Monday that "we've said all along that a budget deal will only be yielded if Democrats and Republicans on Capitol Hill sit down and work together in good faith to try and reach a compromise."

The tentative deal is a byproduct of bipartisan negotiations with the White House which began on September 17th, and aides say that any increases in defense spending included in the deal will be met with equal increases for non-defense programs, a key Democratic priority.

"As I've been saying for a long, long time it's past time that we do away with the harmful draconian sequester cuts," Senate Minority Leader Harry Reid, a Democrat from Nevada, said Monday on the Senate floor, "We must also ensure that there's equal defense and non-defense cuts or increases — need to be equal."

If the proposed deal is passed by Congress, it would then set spending levels so that the appropriations committees in both the House and Senate could craft legislation to fund the various departments of the government. By agreeing to spending levels two years in advance, Congress would theoretically avoid the spending fights that have resulted in short-term stop-gap funding bills that Congress has passed in recent years.

A House aide notes that coupled to this budget package would be a clean suspension of the debt limit until March 2017. GOP leaders in both the House and Senate have been highly skeptical that a “clean” debt limit bill could pass either chamber and are hopeful attaching the entitlement reforms and offsets included in the budget agreement could make the deal more appealing.