Taiwan began pressing for a definite new defense commitment from the United States today, apparently hoping the American Congress will insist on measures to assure Taiwanese security when the 25-year-old mutual security agreement ends.

Premier Y. S. Sun, in comments directed at Taiwan's congressional supporters in Washington, irged "legislative steps" to provide a "deterrence to Communist invasion" from the mainland. At a news conference, he declined to specify what measures Congress might take, but said a congressional resolution is one possibility.

He also called on the United States to promise to sell Taiwan a wide array of new weaponry to bolster its defenses once the present arms sales commitment is insufficient.

Sun specifically mentioned Taiwan's wish to buy new fighter aircraft and two types of defensive missiles. "We have a long shopping list and these are only a few of the items," he said.

Meanwhile, a disagreement surfaced over how the United States will be represented here when its embassy closes Jan. 1. Sun said Taiwan expects direct government-to-government contact.

The United States has not disclosed what its representation will be but it intends to establish a nongovernmental office as other nations have done. Informed sources said the U.S. plan does not envision direct government-to-government contacts, although they said some form of communication between the two governments will be possible.

Sun's demand for a new security arrangement and direct contact with the U.S. government signified a a shift in Taiwan's tone in dealing with the loss of U.S. recognition. Its plan now seems to be to make the best of a bad thing and salvage as much reassurance as it can in whatever new association takes form after Jan. 1.

It is counting heavily on the American Congress. The government has taken encouragement from the comments of congressmen critical of President Carter's deision. Taipei newspapers are full of stories about congressional criticism of the president.

Sun, the chief executive officer under President Chiang Ching-Kuo, said Carter promised last week that Taiwan's security would not be jeopardized by the new ties with Peking.

"But there were no specific references of how the United States is going to assure the peace and security of Taiwan," he said. "It is based on their judgment that the Chinese Communists will not use force to invade. This is a very dangerous assumption. And so we tend to doubt the sincerity of the United States' words about our security."

The United States has agreed to continue selling defensive weapons to Taiwan after the siplomatic realignment, a promise Communist China insists eventually must be abandoned. Peking also refused to make a public commitment not to use force against Taiwan. But there has been speculation that the United States may have received a secret pledge.

One informed source said here, "We made it clear that we expect a peaceful resolution of the Taiwan issue and the word 'expect' means more than just a hope." The source did not elaborate.

The peking government has ceased talking of "liberating" Taiwan and now uses the "reunification" instead, the source noted.

Meanwhile, U.S. Ambassador Leonard Unger attempted to soothe public opinion here, in a speech to the Rotary Club of Taipei. He recalled Carter's promise to help create new arrangements to maintain the peace, confidence, prosperity and well-being of the people of Taiwan."

Taiwan will be able to purchase from the United States "the weapons it will require for its legitimate defensive needs," Unger said.

He did not spell out what "new arrangements" might be offered, but said that in economic, cultural and commerical relationships "we expect our activities in the future to be very much like what they have been in the past."