In an administration where some chief figures have suffered tarnished reputations, Treasury Secretary James A. Baker III is one star whose standing remains secure.

True enough, the economy since 1985, with Baker at the helm as chief economic adviser, has deteriorated. Republican political analyst Kevin Phillips calls attention to the ''depressing sequence'' of trade and budget megadeficits, decline of the dollar and emergence of the United States as the world's leading debtor nation.

But supply-side economics and a disregard for the piling up of federal debt that led ultimately to an overvalued dollar can more properly be laid directly on the president's doorstep, or charged to the negative side of the Donald T. Regan ledger at Treasury.

The final score isn't in on Baker's two major economic initiatives -- his efforts to solve the poor-country debt problem and to manage the international monetary system. For the moment, the dollar is very stable -- even strong. But whether that will last or, more important, whether it is the right strategy for the United States is hotly debated in financial circles.

Baker feels that great progress has been made in reaching new international accords that stabilize exchange rates within predictable zones. But Geoffrey Bell, a New York investment analyst, warns: ''Wait until the next round of bad trade figures!''

Meanwhile, while Chief of Staff Howard Baker struggles to put the political pieces back together after the revelations of the Iran-contra hearings, Jim Baker is hard at work trying to salvage whatever economic Brownie points may be left for the Reagan administration over the next 18 months. Displaying his usual talent for compromise with legislators on both sides of the aisle, he was able to get a last-minute deal on a bill to rescue the nation's dead-in-the-water savings and loan institutions.

It's clear that this compromise won't get to the heart of the S&L problem, but it buys time: Baker is a believer in taking half a loaf, if you can't get the whole thing. He hopes a new approach on the deficit through a revised Gramm-Rudman-Hollings procedure will dampen pressures for a tax increase.

The biggest upcoming test for the genial Texan will be the trade issue: as Congress approaches a fateful conference next month on differing, restrictive trade bills passed by the Senate and House, he makes clear that if key protectionist provisions remain in legislation, President Reagan will veto it.

Baker's strategy is to work for a compromise that the president can swallow. A minority view within the administration is that Baker and U.S. Trade Representative Clayton Yeutter, in trying to get the worst elements out of the bill, may accept other provisions that are almost as bad. Better, they say, let a bad bill pass that will be vetoed. But Baker has too many political smarts to take anything for granted -- including the administration's ability to garner enough votes for an override.

Of course, it takes two to compromise, and there is reason to believe that House Speaker Jim Wright (D-Texas) and Senate Majority Leader Robert Byrd (D-W.Va.) do not want a bill the president can sign. Some other Democrats say privately that Wright and Byrd would rather provoke a veto, in the hopes of getting a good campaign issue for 1988.

It will be difficult to purge the two bills of all of the veto bait an angry Congress has pumped into it. Major sticking points include a contentious provision requiring 60-day notice for plant closings and proposed new directives, unacceptable to Baker, to publish exchange-rate targets.

There is also a ''sleeper'' in a section in the Senate bill authored by Steven D. Symms (R-Idaho). It would bar any American contribution to an international agency making a loan for the production of commodities in oversupply. That would effectively bar American dealings with the International Monetary Fund and World Bank.

In addition to the highly publicized Gephardt amendment (which seems headed for the junk pile, where it belongs), there are specific provisions protecting lamb, sugar, steel, tobacco, textiles, uranium, dried milk, telecommunications and shipping. There would be special marketing agreements for wheat, soybeans, cottonseed and sunflower seed. Another danger area is a proposal for the screening of foreign investments. The list is almost endless in 1,000 pages of proposed legislation, the extent of which would only be unraveled by lawyers in years to come.

If out of all this Baker can get a trade bill that the president can sign -- perhaps while holding his nose -- he can claim a legislative miracle. That would be at least one modest economic success for Reagan's lame-duck years.