MOSCOW — WITH broad grins on their faces, United States Secretary of State James Baker III and Russian President Boris Yeltsin clasped hands like old friends as they met for the first time since last month's failed coup."We have been through a very unusual period, and we were on the brink of major upheaval," Mr. Yeltsin said, opening the meeting. He went on to thank the US for its support during the coup. "It never would have been possible without the efforts that you and the other democratic reformers undertook right here at the barricades," Mr. Baker answered, referring to the coup resistance effort at the Russian parliament building, where the meeting was being held. Baker's actions and words reveal the Bush administration's new admiration for leaders, particularly Yeltsin, who previously had been held at arm's length. The failed coup has also prompted the US to reassess its relationship with President Mikhail Gorbachev and the Soviet Union, specifically in the realm of foreign aid. The US now seems prepared to go further than ever before in helping bail the Soviet Union out of its current economic and political crisis. At the same time, Baker has made it clear that the US will not be having discussions only with central authorities. The secretary of state's agenda is informative: After conducting talks with top leaders in Moscow on this Soviet visit, Baker plans to visit the newly independent Baltic nations of Lithuania, Latvia, and Estonia, where he will hold talks concerning the granting of most-favored-nation trade status, US officials say. In addition, Baker will travel to the Central Asian republic of Kazakhstan, whose president, Nursultan Nazarbayev, has emerged as a top reformer. But strengthened relations with individual republics has not weakened the US's desire to work with Moscow on a future Middle East peace conference, US officials say. Baker planned to discuss the October conference and "the question of invitations" with Foreign Minister Boris Pankin before leaving Moscow today, according to a Reuters report. Meanwhile, Gorbachev aide Yevgeny Primakov is on a tour of Middle Eastern countries. His agenda includes promoting the peace conference as well as requesting economic assistance for the Soviet Union. With many experts saying the nation will need help to make it through the coming winter, Mr. Gorbachev and Yeltsin have made efforts to encourage US aid. Just a few months ago the US was willing to offer only technical assistance, saying concrete political and economic reforms were needed before material help would be considered. During his talks with Baker on Wednesday, Gorbachev announced a Soviet training brigade would soon be withdrawn from Cuba. (See story, Page 7.) It was unclear how many troops were involved, with estimates ranging from 3,000 to 11,000, but Baker described it as a "substantial gesture." Later Yeltsin reassured the secretary of state that Soviet nuclear weapons would remain under central control. While Baker indicated the West was now prepared to help the Soviet Union materially, especially with emergency supplies of food and medicines, details about potential financial aid packages remain elusive. One reason for US reluctance to be more forthcoming, according to US officials, is that the Soviets lack a cohesive economic strategy while the country transforms itself from a federation into a loose confederation. There is also no agreement yet to link and coordinate the former 15 republics' economies. "There is a clear distinction between humanitarian assistance and technical economic cooperation on the one hand - which should move without regard to the production of a credible economic reform program - and other types of economic cooperation on the other hand," Baker said. And in a speech to the Conference on Security and Cooperation in Europe, which is currently holding its session in Moscow, Baker made it clear the US was far from convinced that the Soviets had traveled beyond the point of no return on the path to democracy. "How the men and women of this country choose to meet the challenges ahead will surely test - and reveal - the strength of their commitment to democratic values," Baker said in his speech. "The courage you showed in August must be continued and consolidated," Baker continued. He went on to list five conditions for the West's continued support, including the peaceful transformation of the nation, respect for all internal and external borders, adherence to democracy and the rule of law, the continued safeguarding of human rights, and observation of international treaties and obligations. For now, Soviet political leaders and economists have been reluctant to discuss specific financial assistance needs. The aid issue currently focuses on Soviet participation in international financial institutions, particularly the International Monetary Fund and the World Bank. At least one leading Soviet economist, Grigory Yavlinsky, the principal author of an economic union plan now under consideration, said the international community should not consider giving aid to the Soviet Union until an agreement unifying republican economies is in place.