In an unusual public declaration of the extent of American involvement in a foreign crisis, the State Department acknowledged yesterday that a U.S. four-star general has been urging Iranian military officers to support the government of Prime Minister-designate Shahpour Bakhtiar when it is formed.

Rejecting suggestions that such advice from Air Force Gen. Robert Huyser represented interference in Iranian affairs, State Department spokesman Hodding Carter said that Huyser had urged the Iranian military "not to take any steps beyond those called for by the constitution" of Iran.

Privately, U.S. officials indicated that concern about Iranian generals staging a coup rather than accept the Bakhtiar government was a major factor in the decision to dispatch Huyser, the deputy commander of American forces in Europe, to Tehran.

Huyser, who prolonged his stay in Tehran and who was still there last night, was also thought to be playing a role in trying to bring together hardline generals and Bakhtiar's choice for defense minister, Gen. Freydoun Jam.

That reported effort evidently failed yesterday as Jam turned down a post in the Bakhtiar cabinet and, in the view of U.S. officials, dealt a serious setback to hopes by the shah and Bakhtiar of forming a coalition cabinet to take charge of the country. Some U.S. officials now expect Bakhtiar to take the defense ministry portfolio himself.

Spokesman Carter said Huyser is also discussing technical aspects of military sales to Iran. American contractors who are not getting paid under contracts already signed face decisions soon on whether to go ahead with the contracts and declare them void and attempt to collect funds in escrow for such an eventuality.

Carter touched off a lengthy exchange with reporters at the noon briefing by responding "Yes" when asked if Huyser had advised the Iranian military officers he was seeing to support Bakhtiar.

He said that since the general's advice was based on "a constitutional format that is being followed," it did not constitute interference by the United States. Carter has said for the past three weeks that the United States was declining to advise the shah on whether he should leave Iran because that was an internal question that the shah should decide.

U.S. officials said that Ambassador William H. Sullivan had insisted on meeting with Huyser before he saw the Iranian generals, but they added that they did not know what Sullivan's attitude toward the mission was.