President Carter has warned Ethiopia that the United States would "consider it a very serious breach of peace," if the Ethiopia-Somalia conflict leads Ethiopian forces to cross Somalia's borders.

The president revealed this warning in an interview Thursday with a group of black journalists. The text of the interview was made public yesterday.

His words indicated escalating U.S. concern over the fighting between Somalia and ethiopia, which is backed by Cuban forces and Soviet military advisers, in the Ogaden Desert. The Ogaden is an Oregon-sized territory within the borders of Ethiopia, inhabited largely by ethnic Somalis.

Carter's warning came as the State Department yesterday revised its estimates of the number of Cubans in Ethiopia from 3,000 to "5,000 and growing." The figure of 3,000 Cubans was used last Friday by Secretary of State Cyrus R. Vance, who said 2,000 of them were combat troops involved in the Oregon fighting.

It also was announced yesterday that the president has sent David Aaron, his deputy national security affairs advisers, to Addis Ababa to confer with Ethiopian leaders. Relations between the two countries have been so strained that neither currently has an ambassador in the other's capital.

Addis Ababa Radio said Aaron, within hours of his arrival yesterday, met with Ethiopia's head of state, Li. Col. Mengistu Haile Mariam. Mengistu, the radio report added, "repeatedly reaffirmed that for peace to be restored to the Horn of Africa, the reactiinary Somali government's troops would have to e withdrawn from Ethiopia immediately.

Last week, the United States and four allies - Britain, France, West Germany and Italy - warned that, if an expanding Ethiopian offensive in the Ogaden spills over the Somali border, the West supply arms to Somali.

In response, Mengistu accused Carter of personally coordinating an allieance to back Somalia, and threatened to break relations with the five western countries.

He was echoed yesterday by the Ethiopian charge d'affaires in Washington, Tibabu Bekele, who issued a statement calling Carter's warning "a gross interference in Ethiopia's internal affairs and an attempt to impose a limitation on the exercise of her sovereign rights."

He described U.S. calls for a ceasefire and a withdrawal both of Somali forces from the Ogaden and the Soviets and Cubans from Ethiopia "as a campaign to circumscribe Ethiopia's right to defend herself."

"Soviet and Cuban advisers and technicians are in Ethiopia because they have been invited to assist in Ethiopia's development efforts," Tibabu said. "They are there as a result of a sovereign nation's invitation. But the Somali soldiers are in Ethiopianterriroty as aggressors. There is a world of difference between aggressors and advisers."

Tibabu also repeated past Ethiopian assertions that the Cubans ans Soviets are serving in a strictly advisory capacity and are not involved in the Ogaden fighting. When asked about the new State Department estimates of the Cubans, he replied: "How many are there is not a relevant question to answer."

In making public the new estimate, a department spokesman, Ken Brown, said: "We know the number is going up." He refused to discuss the basis for the revised estimate of the Cuban buildup, but it is an open secret that U.S. intelligence agencies keep close track of Cuban ships and planes.

Tibabu said reeated Ethiopian assertions that, despite U.S. declarations of neutrality, arms from the United States and Western Europe are being supplied to Somalia. The weapons, he said, are being channeled through Egypt, Saudi Arabia and Iran, all Moslem countries sympathetic to Somalia.

Reportss yesterday from the Somali capital of Mogadishu quoted diplomatic sources there as saying that substantial numbers of sophisticated weapons - among them West German tanks and U.S. missiles - are secretly being shipped into Somalis from the Middle East. The Somali government repeatedly has denied such reports.

At the State Department, Brown responded to questions about whether U.S. weapons supplied to Middle Eastern countries were being transferred to Somalia by saying: "If there are U.S. arms there, they were not provided by us or by our permission."

Washington has put an embargo on arms shipments to both Somalia and Ethiopia, and the department had said several times it has been unable to verify persistent reports of Armericanmade weapons and equipment turning up in the Ogaden conflict.

Privately, diplomatic sources confirm that Egypt, Iran and Saudi Arabia have all given Somali some military aid. However, the sources said, the equipment supplied has - to their knowledge - been limited to small arms, ammunition and some mortars.

The sources said they had no confirmation of the newest reports about Somalia getting sophisticated arms.