Soviet leader Mikhail Gorbachev said here today that the leading nuclear powers should work jointly to design a new generation of more reliable nuclear reactors and agree to provide free medical care, housing and other financial assistance to accident victims.

In a speech at a machine-tool factory, Gorbachev called for a legal framework obligating governments to compensate victims of accidents, but he did not make clear which governments would bear the financial responsibility for such compensation.

Soviet officials reiterated Moscow's position that it owes no compensation to other European countries because of damage to agriculture following the nuclear accident at Chernobyl.

The Soviet leader did not detail his proposal, which expanded on his previous television address on the accident, but he indicated that the international action should be carried out through the Vienna-based International Atomic Energy Agency.

"Chernobyl warns us once again: man has set into operation a really fantastic force that must be strictly checked," Gorbachev said. "Particular attention is to be paid to the material and moral-psychological damage caused by the nuclear accident."

He said the Soviet Union already had taken new safety measures at all of its nuclear plants, "both in operation and under construction."

The statement, one day before a summit meeting of the Soviet-led Warsaw Pact military alliance, apparently was intended to assuage concern about Soviet management of nuclear power.

Several of Moscow's Eastern European allies suffered substantial economic losses as a result of the Chernobyl accident, and officials in several countries have expressed frustration with the Soviet failure to provide information during the crisis.

Valery Legasov, a member of the Soviet committee investigating the accident, said that the disaster had raised political and legal issues "that we need to tackle" and that "on the information side, there were some problems."

But Soviet officials accompanying Gorbachev here argued that damage to agriculture in Europe had been caused by media reaction to the accident, not a threat of radiation, and turned aside questions about compensation.

Hungarian officials said that the subject had not arisen in Gorbachev's talks with the Hungarian leadership, which has estimated it lost $150 million in food exports after Chernobyl.

Gorbachev, cutting a high profile in the second day of a four-day visit here, also said that the seven-nation Warsaw Pact would propose "radical cuts" in conventional military forces in Europe following the two-day meeting of its top national leaders here. He said the program under discussion would be "detailed" and would involve "a definite period of time."

Gorbachev added that the Soviet Union would present soon a proposal for a world space organization within the United Nations to promote "star peace," and he criticized the Reagan administration's refusal to give up nuclear tests as "an impossible, immoral and dangerous policy."

He reiterated his offer to make proportionate cuts in the Soviet Union's nuclear arsenal if France and Britain gave up their nuclear weapons.

Touring a factory, a farm and a glittering shopping street in Budapest after two days of meetings with Hungarian leader Janos Kadar and other top officials, Gorbachev appeared supportive of Hungary's innovative economic policy, although he stressed the need for closer economic ties between Hungary and the Soviet Union.

The Kremlin chief repeated his intention to launch "daring reforms" in the Soviet Union and said Moscow "follows with respect the efforts made in Hungary and other socialist countries to find solutions to the by no means simple economic and social problems."

Hungarian officials pronounced the bilateral phase of Gorbachev's visit a success and said the Soviet leader has been encouraging about the country's widely watched program of relaxing central controls of the socialist system.

The economic changes occasionally have been criticized in the Soviet press, and Hungarian officials long have been concerned about potential opposition in Moscow to their introduction of some mechanisms of capitalism and pursuit of stronger economic ties with the West.

Gorbachev "showed great interest" in the Hungarian reforms, Hungarian communist party spokesman Janos Barabas told reporters. "He understands our solutions and our methods."

Kadar, the veteran leader who has overseen the economic changes, conceded in his own speech at the tool factory that "we have some problems, more than necessary, and we must still surmount difficult obstacles."

Hungary has endured a prolonged economic slump, and production results so far this year are well below planned targets.