The Senate Agriculture Committee, with a collective shrug of frustration, last night approved a costly new four-year farm bill that drew instant warnings of a presidential veto.

Majority Leader Robert J. Dole (R-Kan.), who voted for final passage, said the bill will go to the Senate floor in two weeks but that its cost must be scaled down if it is to win White House approval.

The bitterly debated measure would be about $11 billion over the budget limit of $34.8 billion, according to the Congressional Budget Office, or as much as $19 billion over by Agriculture Department calculations.

Last night's 10-to-6 vote to send the bill to the floor, which found Chairman Jesse Helms (R-N.C.) voting against, occurred after the committee had wrangled for months over price-support loan levels and income-protection provisions for farmers.

But with the law due to expire Sept. 30 and Democrats and GOP defectors holding a voting edge, Helms decided to drop his hold-the-line insistence and allow a final vote.

"They've got the votes. I can count and I know they can roll me," he said. "We'll just have to fight it out on the floor."

The key break came when the committee voted 10 to 7 for an amendment by Sen. John Melcher (D-Mont.) to freeze direct subsidy payments to farmers at current levels for four years, a move that analysts said would add about $1 billion to the price tag. The administration opposed the freeze.

Helms denied there was a connection, but last night's committee action appeared related to his efforts to get a separate tobacco program aid package through the Senate Finance Committee.

Democrats were prepared to block the tobacco measure unless Helms relented on allowing a vote on the farm bill subsidy section.

On the final roll calls last night, tobacco-state freshman Sen. Mitch McConnell (R-Ky.) dropped his usual conservative position and voted with the Melcher forces.

He told reporters there was "obviously" a link between his votes and the Finance Committee action.

As it now stands, the committee bill generally would lower price-support loan rates for wheat, corn, cotton, rice, peanuts and sugar, while holding the income subsidy payments at current levels. Wheat farmers would get to vote for mandatory production controls.

This section of the bill was its most controversial. Democrats held out for income protection, arguing that the battered farm economy would suffer more under the budget cuts pushed by Helms and the Reagan administration.

The administration argued that price-support loan levels, which tend to put a floor under the market, must be lowered to make U.S. goods more competitive in the export trade.

Democrats bowed to that, but insisted on income protection in the form of direct payments.

Unlike a counterpart farm bill that the House will take up next week, the Senate version calls for cuts in the dairy support levels as a way of slowing production and reducing government surplus purchases that have surpassed $6 billion since 1981.

The bill also contains strong soil conservation provisions, creates a conservation "reserve" that would pay farmers to take land out of production and provides food stamp authorizations that are about $1 billion under budget limits over the life of the bill.