Ethiopia claimed yesterday that its troops were advancing rapidly to recapture the Somali-occupied Ogaden region and Somalia confirmed that insurgent forces it supports are retreating.

The Somali news agency said six Ethiopian jets attacked the two key cities in the northern part of the country, Hargeisa and the Red Sea port of Berbera in the first reports of air raids across the border since Ehtiopia launched its counteroffensive last week.

In Washington, the State Department said Soviet pilots are now in Ethiopia but it could not confirm whether the pilots have been flying combat missions against the Somali forces.

Somalia has claimed that Soviet and Cuban pilots and ground forces are involved in the fighting but there had been no confirmation from the State Department. Department spokesman Hodding Carter indicated on Monday that Cuban pilots were flying missions.

The United States has frequenlty complained to the Soviet Union about its $800 million arms buildup in Ethiopia and about the increasing number of Soviet and Cuban troops in the country, now estimated at 1,000 and 3,000, respectively. There have been reports this week that thousands more Cubans are currently enroute to Ehiopia in Soviet ships.

Washington Post correspondent Thomas C. Lippman reported from Mogadishu that the Somali government distributed a detailed communique saying Ethiopian forces, led by Soviet and Cuban troops, made some gains around Dire Dawa, the largest city in the Ogaden.

The communique, attributed to the Western Somali Liberation Front, addmitted its forces had made some tactical retreats.

The statement maintained, however, that the withdrawals were minor and "had not weakened our positions at all."

Somalia maintains that none of its own troops are fighting in the Ogaden and only forces of the Somali-backed front are engaged there. Somalis and Ethiopians have contested the Ogaden region in southeastern Ethiopia for almost a century. Somalis forces have captured about 90 percent of the area since last summer.

In Addis Ababa, the Ethiopian capital, Ethiopian military spokesmen said their troops were expected to recapture Jigjiga, a key radar and communications outpost lost in September within a few days, according to news agencies.

Baalu Girma, acting minister of information, told a press conference that Ethiopia has no intention, as Somalia has claimed, of going beyond its own borders. "All we want is to drive the Somalis out of our territory. We have to settle this question once and for all," he said.

In the last few days Ethiopia has invited scores of western journalists into the country for the first time since Septmeber in a move apparently keyed to the offensive.

Government officials have indicated that reporters may be taken to the front. All the reports of the fighting have come far from the scene of the action and there has been no independent confirmation of the conflicting claims.