President Reagan has assured congressional leaders he will sign the latest version of a Pentagon budget bill that is similar in most respects to a measure he vetoed last month.

"This bill will be signed," Sen. Sam Nunn, D-Ga., chairman of the Senate Armed Services Committee, told his colleagues late Wednesday.The assurances of Reagan's approval were conveyed by Defense Secretary Frank C. Carlucci during a week of closed-door talks with Nunn and other legislators, Nunn said.

"The president will approve this bill. That was made very clear and definite," said Rep. Les Aspin, D-Wis., chairman of the House Armed Services Committee.

The House voted 369-48 approval of the revised measure Wednesday afternoon. Three hours later, the Senate passed it, 91-4.

Overall, the measure authorizes the Pentagon to spend $300 billion in the fiscal year beginning Saturday, the same total as was contained in the bill Reagan vetoed Aug. 3. That represents a slight cut from this year's $301 billion defense budget.

While the new measure contains the same reductions in Reagan's proposed Star Wars budget as the original legislation, the earlier bill's congressionally mandated restrictions on internal spending in the Star Wars program were removed.

The Strategic Defense Initiative, as the Star Wars anti-missile research program is formally known, would receive $4.1 billion in the bill, compared to the $4.8 billion sought by Reagan and the $3.9 billion authorized for this year.

The Pentagon wanted to spend up to $330 million of the SDI money on a space-based interceptor weapon, the first stage of an early deployment SDI program. The previous Pentagon bill would have restricted that to only $85 million, but the new measure removes that limit.

The new bill also removes a restriction on flight testing of "depressed trajectory" missiles, which fly relatively low instead of into space as do other long-range atomic weapons. The United States has none of the weapons under development and no plans for testing, but the Soviets are believed to be developing the weapons.

Money to pay for the programs authorized in the bill is part of a separate Pentagon appropriation bill.

The measures are the major unfinished items on the congressional agenda as legislators try to wind up their work and quit for the year.

The new Pentagon bill also rewrote the complicated spending plan for the MX and Midgetman nuclear missiles.