The House last night approved by a 215-to-188 vote a labor-sponsored bill designed to limit Japanese car imports by requiring that they contain a substantial amount of U.S. parts and be assembled by U.S. workers.

Before approving the bill, however, the House passed by a one-vote margin a weakening amendment saying that nothing in the bill could violate the terms of any existing treaty or trade agreement.

The weakening of the auto content bill and the defeat in the Senate of a "buy-America" provision on the highway reconstruction bill appeared to signal an abrupt softening of the congressional clamor for protection against imports.

The Reagan administration, which strongly opposed the content bill as one that would cut jobs instead of adding them, argued that it violated America's obligations under international trade agreements.

The House vote was surprisingly close, considering the strong protectionist sentiment among its members. The aye votes failed to match the number of the bill's sponsors, 222.

As it is, House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) gave the bill no chance of passing the Senate, but he said he wanted the House vote to "send a message" to the Japanese.

Earlier in the day, Senate Finance Committee Chairman Robert J. Dole (R-Kan.) threatened "limited warfare" against Japan and Western Europe on trade, and the U.S. steel industry said it will ask the Reagan administration to restrict imports and impose tariffs on Japanese steel.

Meanwhile, the Senate turned back a protectionist move, an amendment to require the use of U.S.-produced steel in bridge and highway repairs under the $5.5 billion highway and mass transit improvement bill that would add 5 cents-a-gallon to federal gasoline taxes. The amendment was defeated 51 to 47 after Sen. John H. Chafee (R-R.I.), who threatened a filibuster, attacked it as "a bon bon for the wealthiest workers in the United States," members of the United Steel Workers union.

The House last week passed a similar "buy America" amendment and the differences in the highway repair bill will have to be worked out in conference.

Both houses are under pressure to cut imports in an effort to provide more jobs for U.S. workers in the face of the highest umemployment rate since prior to World War II.

Reflecting a prevailing view in Congress that the United States is the victim of protectionism by other nations, Dole told reporters at a breakfast meeting that the nation may have to act tough to force its trading partners to end subsidies and open their markets to U.S. imports.

"We're going to have to move very quickly on trade to head off single-shot efforts" such as the local content bill, Dole said.

The tenor of Dole's remarks was similar to sentiments voiced by former vice president Walter F. Mondale, a leading candidate for the 1984 Democratic presidential nomination, at trade union conventions across the country.

The steel industry move against Japanese competition was announced at a press conference by David M. Roderick, chairman of U.S. Steel Corp. and head of the American Iron and Steel Institute, who said a formal complaint will be delivered Thursday to U.S. Trade Representative William E. Brock.

According to Roderick, the complaint will charge that Japan for the past 10 years set up agreements with the European Community to limit imports and establish minimum prices on steel. Further, Roderick said, the Japanese and European steel industries carved the world into spheres of influence, with the Europeans taking the part of the globe west of the Suez while the Japanese took the Far East, India and Pakistan.

Japan and the Europeans agreed to honor each others' prices in their respective spheres, the American steel industry said it will charge. Roderick declined to provide documentary evidence of such a cartel, but said it will be contained in the formal complaint.

The charges, which Japanese diplomats called "astonishing," and which a U.S. steel expert called "preposterous," are similar to those in a complaint filed by the institute in 1976 which former U.S. Trade Representative Robert Strauss rejected. But Roderick said the industry has more evidence now to support its claim.

Roderick said the complaint, which will be filed on behalf of the AISI and eight individual steel companies, asks the government to limit Japanese steel imports to 1.9 million tons a year for four years--a decrease of almost 4 million tons from last year's imports--to compensate for past injuries, and to impose a 25 percent tariff on Japanese steel to reflect the current low value of the yen.