The Senate Agriculture Committee, rebuffing both the administration and the usually influential dairy lobby, agreed yesterday on a new dairy-support plan that will continue high federal costs but may cut surpluses.

The dairy provision, crafted by Sen. Patrick J. Leahy (D-Vt.), was accepted unanimously by voice vote as part of the new farm bill the committee is writing, even though the administration protested that it would not solve the surplus problem quickly enough.

The plan would freeze price-support levels at least until Jan. 1, 1987, then permit annual reductions if surpluses are so high that the government still must buy up excessive amounts of milk to maintain prices.

But it contains no provision to pay dairy farmers not to produce milk.

Assuming no other major changes, the Senate committee action yesterday set the stage for a clash with the House, whose Agriculture Committee adopted with little debate a sharply different dairy provision promoted by the National Milk Producers Federation.

The House farm bill calls for a "diversion" program that will pay farmers from a farmer-financed fund to cut back production.

The program, however, maintains high price-support levels that translate into higher consumer prices.

But the dairy lobby could not get to first base with its plan in the Senate, where committee members such as Leahy and Sen. Rudy Boschwitz (R-Minn.) were upset by an earlier short-term diversion program that they felt was unfair to their dairy-farmer constituents.

Boschwitz, who broke with the federation earlier this year, unsuccessfully offered a dairy plan that would have targeted special federal assistance to the smaller farmers who predominate in his area and cut support levels faster than the Leahy plan.

Leahy conceded that "there is no perfect dairy plan," but argued that his approach would reduce current federal spending by about $250 million over the next three years, assure stability in the industry and "send a heck of a signal" to farmers to cut production by reducing the support level.

According to Agriculture Department analysts, the Leahy proposal would cost about $3.9 billion for three years.

Boschwitz contended that the real cost would be closer to $5 billion after the committee agreed to remove language that would have barred high-producing Californians from the federal surplus acquisition program.

Although the administration did not oppose Leahy outright, Robert Thompson, assistant secretary of agriculture, argued that "the only responsible policy" would be to cut the present price support from $11.60 per hundredweight next January, rather than in January 1987, as Leahy proposed.

Thompson warned that federal surplus purchases are continuing an upward trend that began in April, when the previous diversion program ended, and he predicted that the government will be forced to buy at least 10 billion pounds of surplus dry milk, butter and cheese during the next year.

"We have to send the signal to farmers in 1986," Thompson told the committee. "Eighteen months is simply too long to wait."

Ellen Haas, head of a consumer-food processor coalition that opposes the House diversion plan and wants lower price supports, said the Leahy approach was "a long way from being the right bill, although it provides a framework. It will have to be amended on the floor. The significant thing is that this is a bipartisan bill."

While the dairy section passed with unusual dispatch, the committee continued to be entangled in ponderous discussions of ways to reshape price and income support provisions of the bill for other commodities, while curtailing federal spending.

The long debate has stalled progress on the bill and caused the panel to miss a self-imposed deadline of last Monday for finishing its work. Senate Majority Leader Robert J. Dole (R-Kan.), nervous like other wheat-state senators about returning home for August recess without a bill, raised a new angle yesterday.

Dole suggested, and committee Chairman Jesse Helms (R-N.C.) agreed, that a more politically expedient approach might be to split the big bill into pieces and deal with the commodity-support provisions on the Senate floor before the recess.