Former president Jimmy Carter, ending three days of talks with the topmost Chinese leaders, declared Thursday night that the United States had never agreed to limit the duration of its arms sales to Taiwan.

He added, though, that he had committed the United States in 1978 to sell only "strictly defensive" weapons that cannot be used by Taiwan against the mainland.

The comments by Carter, who authorized and carried through the normalization deal with China during his presidency, dealt a heavy blow to the claim by some Chinese officials that a time limit on U.S. arms sales to Taiwan had been promised as part of the arrangement.

Yet his words also seemed to cast doubt on weather a new sale of sophisticated warplanes to Taiwan, now under consideration by the Reagan administration, would be consistent with such a "commitment."

At an airport press conference this morning before leaving for other parts of China, Carter refused to discuss Taiwan's request for the new warplanes.

But he gave generally good marks to his successor for his handling of Sino-American relations, maintaining that the current administration's policy "is compatible" with the normalizationagreement that was signed in 1979.

The former president again praised Reagan for his decision to consider the sale of lethal arms to China. The Carter administration had authorized sales on non-lethal military equipment, such as trucks, and of advanced technology that could be converted to military use.

On his last day in Peking before a seven-day tour of Xian, Shanghai and the countryside, the former president was given extraordinary attention by the Chinese leadership.

Communist Party vice chairman Deng Xiaoping, considered the most powerful figure in the country, conferred with Carter for 90 minutes and then was his host for lunch. Within earshot of reporters, Deng praised Carter for carrying through the normalization of Sino-American relations. The American, in turn, told Deng with a grin, "If you had been my running mate [in the 1980 election] we would have won again."

In his brief appearance before cameras and reporters, Deng went out of his way to mention the Taiwan issue, saying "we Chinese will never forget" Carter's role in developing the "three principles" of future U.S.-Taiwan relations: withdrawal of formal relations, withdrawal of U.S. troops, and the end of the U.S.-Taiwanese security treaty.

Premier Zhao Ziyang and other senior governmental leaders turned out to greet the American at a reception in the Great Hall of the People. And late Thursday night, Carter was granted an audience of more than an hour with Communist Party chairman Hu Yaobang, in theory the senior Chinese leader. The former president is the first American leader to meet Hu, who took his high post only two months ago.

In another unusual sign of favor, Chinese television broadcast an interview with Carter in prime time Thursday night. In that appearance Carter referred to Taiwan as "a very difficult and sensitive issue" to be resolved by the Chinese people "without interference from my country."

Carter and his wife, Rosalynn, began the day with a 5:30 a.m. bicycle tour of Peking neighborhoods, accompanied by apprehensive Chinese security guards. Both the Carters later spoke of the bike ride, a rare escape from the confinements of officials protocol, as a high point of the Peking phrase of their journey.