President Reagan's promise last fall to transform a squalid downtown Washington shelter for the homeless into a "model" facility was a "limited commitment," not a pledge to "create an ideal shelter," an assistant U.S. attorney told a federal judge here yesterday.

The statements by Edith S. Marshall, the government lawyer, were made at a two-hour hearing before U.S. District Judge Charles R. Richey, who is considering a lawsuit brought by the Community for Creative Non-Violence against the administration over the fate of an 800-bed shelter at 425 Second St. NW.

Richey issued no ruling but announced he would decide by next week whether to let the federal government to close the shelter, which is operated by CCNV in a building owned by the government. Officials have said they will allow the shelter to remain open until July 31 to give Richey time to rule, but they plan to close the building as quickly as possible because of its hazardous conditions.

CCNV, which forged an unusual partnership with the administration two days before last November's presidential election, has accused the government of reneging on Reagan's promise to turn the shelter into a model. The group has sued the administration to try to block the closing of the shelter -- an action it calls "arbitrary and capricious" -- and force the Department of Health and Human Services to make repairs that could cost $10 million.

Richey has asked the Washington law firm of Wilmer, Cutler & Pickering to help sort out legal issues in the complex and emotional case and the judge hintedyesterday he might follow the firm's advice.

The law firm submitted a 45-page brief yesterday, advising Richey to reject the government's motion to dismiss the case, return it to HHS and order the agency to "reach anew a decision with respect to closing the shelter and then explain how that decision accords with its original commitment."

Marshall argued that before the partnership with CCNV was dissolved, the government was prepared to spend $2.7 million to repair the shelter. The decision to renovate, she added, was "political" and not subject to laws governing the actions of federal agencies. Furthermore, she said, it was up to HHS to determine what "model" means.

CCNV attorney Florence Roisman said that the "public, formal and unequivocal commitment" by Secretary of Health and Human Services Margaret M. Heckler on behalf of Reagan had the force of law and should be honored.

Security at the courthouse was unusually tight because about 200 homeless people tried to get into the courtroom, which seats 80.

Minutes before the start of the 10 a.m. hearing, law enforcement officials barred a crowd of homeless people from entering the courthouse because they said Richey's courtroom was full. To protest, CCNV leader Mitch Snyder and others blocked the entrances briefly.

The matter was resolved when Chief Judge Aubrey E. Robinson Jr. came downstairs to investigate. Snyder protested that security officials were barring CCNV supporters -- but not others -- from entering. Robinson let them enter and line up outside the courtroom.