Buried in the giant tax bill passed by Congress last week is bitter medicine for some of the nation's drug firms: a provision forbidding Medicaid from paying for at least 119 prescription drugs that have been used for many years but have never been proven effective.

The same provision was passed a year ago, nullified through an amendment by Rep. Thomas J. Bliley Jr. (R-Va.), and now is being passed again. This time it will probably stick.

The drugs involved are among 3,400 licensed for public use before 1962, when Congress made efficacy as well as safety a requirement for sale of prescription drugs.

Since 1962 the government has been reviewing those drugs to see if they are effective, and many have been found to be, while others have been found ineffective and thrown off the market.

In the case of still others, the Food and Drug Administration has made an initial scientific finding that evidence of effectiveness is lacking but has not made it final.

Under the law as it existed before the tax bill, these drugs were permitted to remain on the market until the final decision, and were eligible for use in the Medicaid program for the poor. The federal government reimburses the states for part of Medicaid drug costs.

The tax bill provision was inserted by the Senate Finance Committee, after consultations involving Chairman Robert J. Dole (R-Kan.) and Sens. Max Baucus (D-Mont.) and David F. Durenberger (R-Minn.) or their staffs. It does not remove these drugs from the market, where their sales total hundreds of millions of dollars a year.

But it does prohibit U.S. reimbursements for these drugs under the Medicaid program, once the FDA preliminary finding has been made and a notice published that the maker can seek a hearing on the issue. The provision is effective Sept. 30.

Sidney Wolfe, director of the Public Citizen Health Research Group, which has been fighting for years to block Medicaid reimbursement for these drugs, said, "It is difficult enough these days to get health care when you're poor, and if some of the money is being spent on drugs that don't work, it's outrageous."

Moreover, Wolfe said, the use of drugs of questionable effectiveness can hurt the patient severely by preventing treatment with drugs that do work.

Wolfe, who says that since 1971 the government had barred use of these drugs in its own Public Health Service hospitals, estimated that the provision could save many millions of dollars for the nation and the states in the Medicaid program; more, he said, than the $40 million a year once estimated by the General Accounting Office and often cited by members of Congress.

The actual amount of savings to Medicaid is in dispute, however. The Congressional Budget Office did not credit the provision with any savings because, according to the Senate Finance Committee staff, it reasoned that if Medicaid didn't use these drugs it would use other proven, effective drugs that cost the same.

But congressional aides said senators and House members believe the new provision will save a substantial amount of money. "Anyhow, if you're going to pay for drugs they may as well be ones you're sure can work," said a Ways and Means Committee staff member.

Last year a similar provision was slipped almost unnoticed into the budget reconciliation bill by Reps. Henry A. Waxman (D-Calif.) and John D. Dingell (D-Mich.) and accepted by Dole in the House-Senate conference on that measure.

However, Bliley later won approval of an appropriations bill rider that nullified the Waxman-Dingell 1981 provision. A.H. Robbins, a big drug manufacturer with several drugs in the "not-proven-effective" category, has two pharmaceutical plants and its national headquarters in Bliley's district in Richmond.

Now, the tax bill again restores the provision. Bliley tried to kill the provision during committee consideration, but failed.

An aide said he has no plans to move against this provision, nor does the Pharmaceutical Manufacturers Association have plans to attack the change at this time.