Members of the Senate Banking Committee pressed some leading New York City bankers yesterday to increase their investments in the near-bankrupt city or jeopardize long-term Federal financial assistance.

Sen. Donald Riegel (D-Mich.), a supporter of aid for the city, said New York's major commercial banks would have to increase their financial commitment to the city in order for it to gain more support on the committee for federal assistance.

"You may not have the votes unless we can develop some greater willingness by the financial institutions to invest," Riegel said.

The committee is considering a proposal passed last week by the House to replace short-term, direct, federal loans with 15-year federal guarantees of up to $2 billion in lending to the city, primarily from city employe pension funds.

Sen. William Proxmire (D-Wis.), chairman of the committee, questioned what he said was the bakers' reluctance to expand investments in the city while taking what he characterized as "very shaky risks" by investing in developing countries.

"Why can't you do better by your own city?" Proxmire asked. "I can't understand why you can't dig up a few billion dollars for your own city."

"Why don't you just write a check?" asked Sen. Jacob Javits (R-N.Y.).

"Because, Senator, we have a responsibility to our depositors and shareholders to invest our funds in a manner that we think is prudent," said David Rockefeller, chairman of Chase Manhattan bank.

The same answer, with stress on the word "prudent," also came from Edward Palmer, chairman of Citibank; Ellmore Patterson, chairman of Morgan Guaranty Trust Co. of New York, and Robert Rivel, president of Union Dime Savings Bank, who spoke for a group of savings institutions.

Banks already have put $2 billion into city-related investments. Said Patterson: "There's limit beyond which prudence will not permit us to go."

Private financial institutions with headquarters in New York - including banks, savings organizations and insurance companies - have agreed to lend the city another $1 billion toward a total $4.5 billion, four-year financial recovery plan. But even that sum hangs on a federal loan guarantee bill, according to the bankers.

Proxmire said his panel will take final action Thursday on a bill intended to keep New York City from going bankrupt.

The Carter administration, which is backing the city's bid for long-term bond guarantees, has called the committee's vote "the major test" facing the legislation.

Proxmire said that despite his stated opposition to the bill, he will support some form of legislation being sent to the floor so it can be considered by the full senate.

"I think it would be unconscionable for the committee to kill it," Proxmire said. Even if the legislation is passed, it will "probably be after June 30," Proxmire said.

That is the day the federal government's current short-term loan program to the city expires.Unless it is replaced by a new aid program, Mayor Edward Koch and others have said New York could go bankrupt next month.

Proxmire said if the city goes bankrupt, banks would be among the biggest losers. Withholding federal aid would persuade the banks they must do more, he said.