WASHINGTON — For four years, Defense Secretary Caspar Weinberger was the most powerful figure in President Reagan's Cabinet.

He was the prime architect and salesman for Reagan's military buildup, which has been the key to the administration's foreign and defense policies, and he won almost all of the battles he had to fight.

But in recent months, things have changed for the feisty, combative Weinberger.

His once sacrosanct defense budget has been slashed in both houses of Congress. He finds himself wrestling with the nation's biggest spy scandal in 30 years. He faces widespread charges of Pentagon mismanagement involving defense contractors. And last week, the president ruled against him, and for Secretary of State George Shultz, in deciding to continue observance of the 1979 SALT II treaty with the Soviet Union.

Said one high-level administration official, ''People are beginning to ask, 'How much more can Cap take?' ''

On Capitol Hill and within the administration, there were deeper questions. Can Weinberger still be an effective salesman for the president's high-priority defense budget? Has he lost his clout with Reagan?

The answers, as obtained in interviews with Republican and Democratic members of Congress and with administration officials, are mixed. They suggest a powerful figure in decline, but in no apparent danger of dismissal.

According to the interviews, Weinberger's aggressive salesmanship has alienated many members of Congress, to the point that there is wide agreement that his standing has been permanently damaged and his future potential effectiveness weakened.

But there was no indication that Weinberger is in trouble where it would hurt most -- with his boss and old friend from California days, Ronald Reagan. Moreover, there is no sign of a significant campaign for his resignation, and Weinberger himself says he is going to stay on the job.

Summed up one administration official, ''He's been wounded, but there is still plenty of life.''

Said another, ''Don't forget that he's a scrapper.''

In Congress, however, Weinberger's credibility as a salesman for Reagan's $3 trillion, 10-year defense buildup has become a major issue.

According to some congressmen, that means the buildup no longer will get the kind of free ride through Congress it had during the administration's first term.

''I would say there is some loss of credibility,'' said Sen. Charles Grassley, R-Iowa, a conservative who has strongly criticized Weinberger over the contractor scandals.

Rep. Denny Smith, R-Ore., a member of the House Budget Committee, agrees. ''There is no question he has lost credibility,'' Smith said.

Smith accused Weinberger of ''double dealing'' with Congress. As an example, Smith cited the secretary's argument that whole weapons systems would have to be junked if his budget was cut, and then -- after Congress rejected his arguments -- coming up with $4 billion in unspent appropriations from previous years.

A few weeks ago, Smith recalled, top House Republicans got a closed-door briefing from Weinberger in which the Pentagon chief defended his actions in the budget fight but failed to impress them. ''Republicans came away shaking their heads,'' he said.

Sen. Pete Wilson, R-Calif., an old friend of Weinberger's, was so angry over the surprise discovery of the $4 billion that he told Reagan such tactics ''cannot help but undermine public confidence in the managment of our defense resources.''

''He said, 'Gee whiz, look what we found!' The timing couldn't have been worse,'' Wilson said.

But he did not go as far as Sen. Barry Goldwater, R-Ariz., chairman of the Armed Services Committee. After the unspent money was discovered, Goldwater was quoted as calling Weinberger ''a fool.''

Wilson said he continues to support Weinberger and is confident Reagan will too.

''Cap Weinberger won't leave until he wants to,'' he said. ''He enjoys the president's confidence. They go back a long way together.''

Nor are Democrats calling for Weinberger's head.

''I am not calling for his resignation, even though we have had many disagreements over matters of policy,'' said Sen. Carl Levin, D-Mich., a member of the Senate Armed Sevices Committee.

''But he has cried wolf too many times and he has lost his effectiveness.'' ''He told us too often that they would be dancing in the streets of Moscow if we reduced the number of MX missiles by one . . . There has been too much shooting from the hip.''

Rep. Les Aspin, D-Wis., chairman of the House Armed Services Committee, said Weinberger ''has got some problems, but his relations with Congress have always been difficult, because he has refused to enter into dialogues.''

''But I wouldn't be writing his obituary,'' said Aspin, one of the most powerful and respected Democrats on Capitol Hill on defense issues.

Sen. David Pryor, D-Ark., has said if he were advising Reagan he would recommend that Weinberger resign.