The full U.S. Court of Appeals ruled that the government must pay private attorneys the going rate for legal services when they win or settle discrimination and other types of cases against U.S. agencies.

The court said the total fee award could be adjusted up or down by the presiding judge depending on various factors, including the quality of lawyering. If they lost the case, no fee at all is paid.

The appeals court's long-awaited decision was seen as a crucial victory for public interest lawyers who had contended that a formula that would result in lower fee awards would make it difficult for them to take on costly and time consuming cases against the government.

Yesterday's ruling involved a 1977 decision by U.S. District Judge Gerhard A. Gesell who awarded $160,000 in attorney fees and about $11,000 in costs to the law firm now known as Wilmer & Pickering. Lawyers there, who had asked for $206,000 in fees, successfully sued the government on behalf of Dolores J. Copeland, a computer specialist who charged the Labor Department with sex discrimination.

As a result of the lawsuit, Copeland and 24 other employes received a total of about $33,000 in back pay and the department drew up new plans for training and promotion of women.

Gesell figured the fee amount by starting out with the average hourly billing rate for the kind of private lawyers who had worked on the case, balanced by the results achieved, the novelty of the legal issues and the problems encountered with the case.

Twice, however, a three-member division of the appeals court sent the case back to Gesell and suggested that he instead figure the amount based on the costs incurred by the firm, including actual salaries for the lawyers and overhead.

In June 1979, the full appeals court set aside that decision and yesterday, in a 6-to-2 decision, the full court said Gesell's fee award was reasonable.

The two dissenting judges accused the majority of "ducking the issue" and said the court's opinion left only one path for legal fees in discrimination cases. "It is Up, Up, and Away!" wrote Judge Malcolm R. Wilkey who was joined in his dissent by Judge Edward A. Tamm.

Those judges said that private attorneys in such cases are really acting as "private attorneys general" doing "government legal work" that is never compensated at the salaries paid by the large Washington law firms.

Judge Carl McGowan, writing for the majority, said that Congress recognized that payment of full legal fees might help encourage the government to enforce rules against discrimination.