During his first year of elective office, Gov. James R. Thompson has passed one test of a viable presidential candidate to oppose Jimmy Carter. But he is in danger of flunking a second test that has long confounded Republican moderates.

There had been doubts about how Republican Thompson, who, as the U.S. attorney in Chicago, specialized in putting crooked Democratic politicians in federal prison, would get on with a Democratic legislature. In fact, he has proved adroit at negotiation and compromise - skills that in a presidential campaign would be offered in vivid contrast to Carter's problems with Congress.

But negotiation and compromise have not reconciled either the Reaganite right or the Old Guard regulars of the Illinois Republican Party. Thomspn's fiscal conservatism and anti-crime program do not convince conservatice Republicans in the legislature. "Believe me, Thompson's a lot more liberal than he seems to be," says one such legislator, determine to fight Thompson-for-President in 1980.

That suggests a formidable problem of enemies within his home state. But in a broader sense, Big Jim Thompson confronts the same puzzle that was faced but never solved by Nelson Rockefeller during two decades of trying: how to pacify the Republican right sufficiently to get a crack at wooing Democrats in a presidential election.

So far, at least, Thompson does not share Rockefeller's reputation as a free-spending high priest of big government. "We have had too many unrealistically high expectations about what government can do," Thompson told us. That sounds a lot like Gov. Jerry Brown of California and a little like Jimmy Carter. But unlike both of them, Thompson avoids confrontation with the establishment - especially legislators. Instead, he seeks accomodation.

Chiefly, there has been the grand compromise between Thompson and the Chicago Democratic organization. In return for backing a cut-down version of the late Richard J. Daley's long-frustated Chicago crosstown expressway. Thompson received Democratic help for his balanced budget. That followed four years of unrelenting struggle between the legislature and maverick Democratic Gov. Dan Walker.

The contrast between Springfield and Washington is not ignored by Thompson. He criticizes Carter for not using his State of the Union message to offer real compromises on energy that would pass a bill without further ordeal. Thompson is saying, in effect governor, Thompson on trips to Washington was making friends with congressional Democratic leaders. He also has been making friends in Sprinfield, radically changing the climate following the haughty, fierce-eyed Walker.

Easily reconized at 6-foot-6, Thompson practices the nonimperial governorship. One day last week, irritated by a critical editorial in a downstate newspaper, he wandered up to the press room for a late afternoon shot of hourbon. The next day, Thompson spent two hours eating lunch with state government public-information officers.

"Gov. Walker was unapproachable; he would never go to a lunch like this." said one official, a Walker patronage employee kept on by Thompson. But such breaking off Illinois' partisan tradition is not universally applauded.

County chairmen complain that non-Republicans get the patronage while their telephone calls go returned. Simultaneously, Reaganites grumble about Thompson's vetoes of pro-Laetrile and anti-abortion bills and support for the Equal Rights Amendment. Both groups protest that "whiz kids" run the state.

So, a combination of ideology and old-fashined politics brings together issue-oriented conservatives who supported Ronald Reagan and patronage-oriented Old-Guardsmen who supported Gerald Ford into an anti-Thompson coalition. These groups are backing an anti-Thompson candidate for state comptroller in the Republican primary March 21 as a preview of what may await the governor in the presidential primary two years hence.

Thompson's response to these Republicans is to stress his tough program establishing "Class X" violent-crime legislation and his balanced budget, called "our greatest achievement" in a speech last week to the Evanston Chamber of Commerce. Thompson declared to them that "every time a government official starts using words like 'bold' or 'imaginative,' the taxpayers reach for their wallets to see if they're still there. The cheer from the Evanston businessmen foretold future use of that applause line.

That cheer truly points to Thompson's main chance of overcoming his enemies within. Nelson Rockefeller never was able to convice Republicans that he worried about anybody's wallet. If Thompson does, grumbling at home about abortion, Laetrile, ERA and even patronage may be kept under control.