A few years ago, it was fashionable among U.S. trade negotiators to say that it really made no difference who was prime minister of Japan. A prisoner of the bureaucracy and his party's business interests, he could make no holes -- even if he wanted to, which he probably did not -- in the brick wall erected against imports from abroad.

Contrast that view with the remark attributed to a senior U.S. official summing up the results of the Jan. 2 conference of President Reagan and Prime Minister Yasuhiro Nakasone in Los Angeles: "When we've gotten commitments at this level from this man (Nakasone), they've been carried out."

The exuberant official may merely have been applying some gloss to an otherwise dull luncheon encounter. Indeed, Japanese familiar with the Los Angeles meeting say no commitments were made, that Nakasone merely "heard" Reagan's latest pleas. Still, the change in American attitudes is striking.

How successful is Nakasone's track record in attacking the barriers U.S. businessmen say they find here? The statistical surface provides limited grounds for the Reagan administration's optimism. After all, the year in which he took office Japan ran a trade surplus of about $15 billion with the United States. Last year it reached $33 billion, and this year it could climb to $50 billion. A series of market-opening measures has reduced some tariff rates, but not many on those products profitable to U.S. industries and a threat to Japanese firms.

Nakasone has shown he can manage his own government on some issues, given a half-free hand. The laborious task of rewriting certifications and standards has shown some quickening of pace in the last two years, although the record of actual business sales does not reflect it. Perhaps the most visible achievement was last spring's agreement to begin opening up Japanese financial markets. The prime minister intervened relentlessly in that encounter with the U.S. Treasury, summoning his finance minister to make greater concessions and to work more swiftly. But in that case he had some latitude. The Japanese financial community was itself divided on liberalization, with some segments as eager as U.S. negotiators to discard old and confining rules of doing business with foreigners.

The statistical trade record of his tenure is not all bleak, either. U.S. imports here are growing, although not spectacularly, and are doing so in the face of the irrationally strong dollar that makes them more expensive. It is the wildly growing exports borne in the other direction by that same dollar that has put the current pressures on Japan.

Japan can ague with much justification that a more reasonable exchange rate would fix things economically, but it wouldn't work politically. The real rub these days is that the seemingly endless trade disputes have boiled down to big- ticket items. Reagan, in Los Angeles, listed four -- telecommunications, forest products, computers and drugs and medical equipment. They're the sort of stuff on which real money rides -- hence the powerful pressures from U.S. industry -- and they're the ones on which Nakasone is going to be tested as the prime minister who makes a difference.

The levers he has to use are somewhat the same as an American president's. First he can muscle the bureaucracy into compliance, compelling it to make the dozens of minor changes in bidding rules and quality standards and safety regulations that are the murky core of trade disputes here. This might be easy sailing for a determined U.S. president. But the Japanese bureaucracy is usually convinced it knows best and is supported in this conviction by a Confucian inheritance that holds that the wise official really does know best.

Second, Nakasone must go to the mat with some hostile and suspicious members of his own Liberal Democratic Party, particularly those in the vise of agricultural interests that are the party's conservative anchor. They don't much like Nakasone anyway and, markets aside, would relish a chance to tarnish his image as an international statesman. He has just lost a bout over tariffs on, of all things, boned chicken, which is important to Southeast Asians. The official word, too, is already out that Reagan's plea for more wood imports is doomed to the shelf.

What can one make of a prime minister who cannot cut a deal with his own kind on boned chicken and plywood? The perception is emerging that Japanese protectionists are wearying not just of the incessant American demands but of Nakasone's positive responses to them. A curious cycle has set in. The prime minister is popular with the public, and a large part of that popularity rests on his frequent appearances on the world stage with Reagan. He is unpopular with his party because those same performances result in yet more demands to offend the party's constituents. As one Japanese economic official noted recently, powerful Diet members are asking, "Why should we suffer so much to make Nakasone look so good?"

Two decades of trade disputes, beginning with textiles and coursing on through autos, steel and color TV sets, have followed a pattern. Sound and fury are followed by smiles and agreements, which last until new embitterments arise. Cooler heads and Japanese concessions prevail, or at least so far.

But the Nakasone era is a bit different. He, unlike his predecessors, has put himself far and visibly out front. Past settlements with the Americans bubbled up from the bureaucracy or were crafted by nonpolitical but respected ad hoc ministers. Other prime ministers found it wise not to venture out on the kind of limb Nakasone is hanging onto, and there are those now eager to see that limb lopped off.