A few months ago the Carter administration, in a public listing of its achievements, pointed with particular pride to two foreign policy "breakthroughs" - the Panama Canal treaties and the move toward improved ties with Cuba.

Now, no one talks any longer about an impending "new era" in U.S.-Cuban relations. When administration officials discuss Fidel Castro's Cuba these days it's in tones ringing with frustration and anger.

Prompting the shift has been Washington's mounting concern about Cuba's role as the alleged military proxy of the Soviet Union in Africa. That continent currently seems unable to have an armed conflict without Cuban soldiers and technicians - more than 30,000, according to administration estimates - lurking in the background or taking part openly in the fighting.

The situation has prompted a lot of talk - in Congress, in the press, even in some quarters of the administration - about the need to get tough with Castro. According to this argument, the way to combat Soviet influence in Africa is to apply pressures against Cuba that will force Castro to bring his soldiers home.

However, such talk doesn't arouse much enthusiasm among U.S. officials familiar with Cuba. Within the administration they are privately trying to make a case that the United States simply doesn't have much leverage that can be brought to bear against Cuba. Because of the high political sensitivity of the internal administration debate on Cuba these officials were reluctant to be identified.

They are arguing, though, that Castro has what he regards as very compelling pragmatic and ideological reasons for his involvement in Africa.

When these are weighted against Washington's biggest potential counterpressure - a breaking off of the movement toward normal relations - there's no question of which choice the Cuban president will make.

The most obvious consideration involves Castro's continued dependence on Soviet aid and financial support to keep the economy of his small island country on keel. Moscow put more than $1.7 billion into Cuba during 1977, and its contributions this year are expected to exceed $2 billion.

At a time whenthe world market price for Cuba's major commodity, sugar, is roughly 8 cents a pound, the Soviet Union buys the bulk of the Cuban sugar crop at 30 cents a pound. Similarly, while other small countries are strangling financially in the escalating cost of paying for petroleum imports, Moscow supplies all of Cuba's oil needs at prices far below the going free market rate.

In contrast, the only economic advantage that Cuba could gain from normal relations with Washington would be an increase in U.S.-Cuban trade. But, as the Cubans like to point out, the biggest advantage would go to the United States, which would be selling technology and finished products while buying relatively cheap Cuban raw materials.

What once loomed as the potentially biggest lure of increased trade - the chance for Cuba to get back a piece of the lucrative U.S. sugar market - has lost a lot of its attraction for the Cubans.

Under an international sugar agreement that soon will go into effect, Cuba will gain a quota giving it greater access for its sugar in Europe and elsewhere. As a result, it will no longer have to think exclusively in terms of the United States as the market for the sugar that the Soviets don't buy.

The Cubans readily admit that improved U.S. ties will give them some cash advantages, principally in the sale of Cuban metal exports and a potential rise in U.S. tourist traffic. But, they also note, these gains would still be only a small factor in the statistics of the Cuban economy, which is now tied inextricably to the Soviet Union and its communist bloc allies.

Nor are cash considerations the only reason for Havana's involvement in Africa. Most experts on Cuba believe it is a serious mistake to assume that Castro is simply using his soldiers and technicians as mercenaries for hire to Moscow.

Although Cuba is probably the most ideologically inconsistent and undisciplined Marxist country anywhere, there is one belief from which the Castro government has never swerved over the years.

That's the mystical conviction that Cuba, which was transformed into a communist state through guerrila warfare, has an obligation to support "wars of liberation" throughout the Third World.

This emphasis on exporting revolution has been perhaps the biggest factor in making Castro a major figure on the world stage. It was personified by his most famous collaborator, the late Ernesto (Che) Guevara, and a number of leftist ideologues like the French theoretican, Regis Debray, have attempted to give it the dimensions of a distinct movement within world Marxism.

During the 1960s, the major thrust of Cuba's foreign military adventures was directed at aiding guerrilla movements in Latin America. That period reaches its symbolic end a decade ago with the death of Guevara and the abortive failure of his expedition in Bolivia.

For a long time, the Cubans but their interest in foreign revolutions on the backburner. That was due partly to Castro's preoccupation with domestic problems and partly to pressures that Moscow, in a detente tradeoff with Washington, exerted to keep him out of Latin America.

However, even in the days of Guevara, there was a lot of talk in Cuba about Africa being the most potantially fertile ground for revolution. Guevara and others used to make speeches and write articles about Cuba, with its strong African heritage, being the logical teacher and ally of African guerrilla movements.

Many U.S. sources say these attitudes are so ingrained in the Cuban government's thought processes that Castro probably would have become a willing partner of the Soviets in Africa even without any economic inducements.

And, the sources add, if Washington has no carrot to counter the economic advantages offered by the Soviets, it also lacks a stick sufficient to beat back the Cubans' ideological fervor.

As one State Department source sums it Up: "We can't attack Cuba. We can't blockade Cuba. We can't even enforce an embargo on trade or muster the votes to keep Cuba out of the Organization of American States any longer. So what do we do? Threaten them with a resumption of U2 overflights?"