After 12 years at the bargaining table, the federal government yesterday reached an agreement with Chicago to end the nation's largest unresolved dispute over teacher desegregation and bilingual education.

Officials from the Department of Health, Education and Welfare said the agreement ends a threat by the Carter administration to cut off more than $100 million a year in federal aid to Chicago schools.

he Chicago school board yesterday voted 9 to 2 to accept a plan calling for each Chicago school to have in its faculty a ratio of whites to minority group members that varies no more than 10 per cent from the 54 per cent white. 46 per cent minority group makeup of the school system's teaching corps.

HEW Secretary Joseph A. Califano Jr., a special assistant to President Johnson when the federal government first threatened to cut off funds to Chicago in 1965, said Chicago has already reassigned more than 1,300 of the 3,000 teachers who will have to be transferred to carry out the agreement.

There are 26,000 teachers in the Chicago system, he said. The city never had to forfiet any of the threatened funds.

School principals also are being reassigned to end what an administrative law judge found was a pattern of putting black principals and black teachers in certain almost-all-black schools, and white principals and teachers in some almost-all-white schools. More than 70 per cent of Chicago's pupils are minority-group members.

Judge Everett j. Hammarstrom also found that the city had an inadequate bilingual education program, a violation of the law.

The agreement requires what Califono called "the most extensive bilingual educational program in the nation," including bilingual special education for the emotionally and physically handicapped.

Califono announced in February he would cut off federal funds for any school or school district found in violation of federal laws against race or sex discrimination.

HEW then nofified Chicago that it faced a funding cutoff.

Califono told a news conference yesterday that shortly after he became HEW Secretary, ReP. Frank Annunzio (D. III.) came to his office with Joseph P. Hannon, Chicago's superintendent of schools.

"I think you can trust the school superintendent to deal fairly with the students," Califano quoted Annunzio as telling him. "His goals are the same as yours."

In April Califano appointed New York attorney Conrad Harper to negotiate with the city. "I thought that a fresh face on our side, like fresh faces on the other side . . . would help," he said yesterday.

Califano called the settlement "a striking demonstration that civil rights issues can be resolved fairly and justly when both parties are committed to good-faith negotiations, not to confrontation . . ." tr for add three

The Nixon and Ford administrations largely abondoned fund cutoffs as a weapon to force compliance with desegregatio n laws. No school district the size of Chicago's, with more than 500,000 pupils, has ever had its funds cut off.

The last school system cut off for civil rights violations was in Ferndale, Mich., in June, 1972.

Peter Libassi, HEW's general counsel, said in Chicago the bilingual portion of the agreement eventually will involved 86,000 children speaking 40 languages.