Once the stanchest ally of the United States in Black Africa, Ethiopia today is playing the same role with just as much zeal for the Soviet Union and Cuba. Its new military leader, Lt. Col. Mengistu Haile Mariam, seems to have set his eyes on becoming the Fidel Castro of this continent.

The change in friends and alliances this country has undergone in the past few years is staggering, and has left many Ethiopians visibly uneasy and bewildered.

Strange anomalies still abound in the new Marxist, revolutionary Ehiopia so that stern-faced Soviet officers staying at the Addis Ababa Hilton hear the American Forces Network, the Voice of America or the BBC morning news on the hotel radio. Outside in the streets, hawkers wave at them the latest issue of Newsweek recounting "China's Vietnam Gamble" and the latest news from the United States.

Only two years ago, Ethiopia was still linked tightly by a handful of 24-year-old treaties to Washington, buying American-made F5E jet fighters and M60 tanks and sending its students and officers to U.S. schools.

Today, it is closely allied to the Soviert Union in a 20-year treaty of friendship and cooperation, indebted to Moscow for $1 billion worth of military hardward and directing all its officers and most civilians allowed abroad to institutions in Eastern Europe.

Ethiopia has become the number one African champion of Vietnam's cause in Southeast Asia and vigorously echoes Soviet attacks on China. But Mengistu obviously feels much closer emotinally to Havana than Moscow and is proud to say that the peoples of revolutionary Cuba and Ethiopia are now "united in blood" as a result of the 1977 war with neighboring Somalia over the disputed Ogaden region.

Cuban combat troops played a key role in Ethiopia's victory and there are still about 15,000 of them stationed mainly in the Ogaden to hold diehard Somali guerrillas in check while Ethiopian forces reconquer the northernmost province from Eritrean separatists.

A special brochure has been published in honor of Col. Mengistu's visit to Cuba last April and on the cover he is seen standing next to Castro, saluting proudly. Both are dressed like twins in simple military uniform and wearing web army belts with a pistol hanging on the right side.

One theory circulating in some Western diplomatic circles is that the Soviets would be delighted to have the Ethiopians take over the Cuban military role in Africa, or at least shoulder a part of it. This, it is pointed out, would give Moscow the equivalent of what the West has in Morocco, whose troops have twice flown on French planes to the rescue of Zairian President Mobutu Sese Seko.

The Cubans presumably also would welcome help from the Ethiopians, allowing them to reduce their costly and controversial military presence on the continent and improve their relations with the United States.

Of all black African countries, Ethiopia is probably the most qualified to provide military assistance to revolutionary friends in need. It has a battle-hardened army of 250,000 men, able and experienced pilots and now hardware provided by the Soviets, including Mig23s.

Questions remain about Mengistu's intentions and Ethiopia's ability to play a larger revolutionary role. It is also unclear whether the Soviets and Cubans will overplay their hand, demand too much and alienate the Ethiopians just as they did the Egyptians, Sudanese and Somalis.

There are some signs of conflict between Ethiopian and Soviet-cuban objectives in Africa and of differences between Mengistu and his new allies over several sensitive internal political issues.

For the moment, however, they seem to have a lot more in common than in disagreement as Mengistu turns his attention to foreign policy.

Mengistu has become deeply involved in training, with cuban help, black nationalist guerrillas from Rhodesia and Namibia (Southwest Africa) and in promoting the cause of the Polisario independence movement in the old Spanish Sahara which Morocco and Mauritania divided between them three years ago.

But Ethiopia's present ability to rush to the rescue of other socialist African or Arab governments and liberation movements is beiing seriously hamstrung by exhausting and seemingly unending wars in the northern province of Eritrea and in the eastern Ogaden region.

Despite major battle victories both over invading Somali forces and two Eritrean guerrilla armies last year, the new enlarged Ethopian Red Army is still bogged down in fighting in both areas and neither dispute has really been resolved.

Some Ethiopian officials privately conceded that a military solution to the 18-year old Eritrean problem is impossible and a political one must be found. But attempts to establish even a basis for a settlement have escaped the Ethiopians, Eritreans, Cubans, Soviets, South Yemenis, Sudanese and East Germans.

Meanwhile, the Somalis are proving as tenacious as the Eritreans. They are reviving their military activities in the Ogaden, despite huge losses in men and arms during the all-out war between Somalia and Ethiopia in 1977-78. The region is inhabited largely by monks of Somali origin.

Despite Ethiopia's continued heavy dependence on Moscow -- in part dictated by its preoccupation with the two wars -- outside observers here note at least four issues where Mengistu has charted his own course independent of the Soviets:

Western diplomatic sources say there is no evidence so far -- that Ethiopia has given in to pressure from Moscow to establish a naval or any other kind of military facility such as the Soviets had at Berbera on the Somali coast before Somali President Mohammed Siad Barre ousted them in November 1977.

Despite providing $1 billion worth of arms, the Soviets have less of a hold here than did the United States before the revolution. The Americans had an enormous base and listening post in Asmara, in addition to a string of long-term treaties.

Soviet, Cuban and East German designs to put together some kind of federation in the Red Sea area of Marxist states, linking South Yemen, Somalia, Ethiopia and possibly a semiautonomous Eritrea, have made no progress and their attempts to engineer a compromise solution to the Eritrean problem have failed miserably.

Ethiopia clearly is not prepared to give up an inch of national sovereignty to any Marxist federation and certainly not to the Eritreans.

Mengistu has taken a personal liking to Rhodesian nationalist leader Robert Mugabe, who traditionally has been supported by China while the Soviet Union and Cuba have backed the rival Rhodesian nationalist leader, Joshua Nkomo. Consequently, most Ethiopian assistance is being channeled to Mugabe's Zimbawe African National Union over Soviet objections.

If anything, Mengistu is working to convince the Soviets and Cubans to swing their backing to Mugabe, apparently with some success, as the Cubans are said to be helping with the training of Mugabe's guerrillas at a camp just outside Addis Ababa.

Mengistu dissuaded the Soviets from forming a political party to lead the revolution in place of the army until his own military-led faction could root out and eliminate other civilian groups reported to be favored by Moscow or Havana.

But such disagreements appear more signs of the Mengistu's determination to maintain independence from the Soviet Union and Cuba than a harbinger of a swingback toward the West.