Venezuela is to sign Wednesday a long-term agreement in New York to refinance its massive foreign debt, but bankers and government officials said the terms will have to be eased if the nation's oil income continues below projected levels.

"We've been flexible with them before, and we'll be flexible with them again if we have to," said one foreign banker here. "The entire situation depends on oil prices, but no one knows what's going to happen there."

The agreement, culminating a three-year negotiating process, reschedules $21.2 billion of Venezuela's public-sector foreign debt over 12 years. The country's overall foreign debt is $33.5 billion, the fourth largest in Latin America, behind Brazil, Mexico and Argentina.

A leading producer in the Organization of Petroleum Exporting Countries, Venezuela is the first nation in the region to refinance its debt without the intervention of the International Monetary Fund.

Venezuela has the highest foreign reserves in Latin America, $16 billion, or enough to pay for 20 months worth of imports. It will have to dip into those reserves this year to meet its $4.2 billion in debt payments.

The country originally was to pay $923 million more, but Finance Minister Manuel Azpurua reached agreement with major creditor banks to defer 1985 and 1986 principal payments to later years. This agreement also gives Venezuela the option to delay the $1 billion in 1987 principal payments.

The government expected to earn $12.6 billion in 1986 by exporting 1.41 million barrels of oil a day at $24.50 per barrel.

Instead, oil revenue could be less than $10 billion this year, with oil prices below $20 a barrel and with production down to about 1.1 million barrels a day.

A strong supporter of OPEC policies until the recent drop in prices, Venezuela has freed the state oil company, Petroleos de Venezuela, to sell at whatever price it can get. The govenment hopes this will boost sales to the target level.

The government also has discontinued announcing price reductions, which it believes has benefited competitors. The country's benchmark crude oil is thought to be selling for $15 a barrel.

The oil price drop has led the main opposition political party to call on President Jaime Lusinchi to demand more favorable terms before signing the debt agreement.

"We'll seek more money from institutions like the World Bank, the Inter-American Development Bank, but not from the foreign banks," said a Venezuelan source involved in the debt negotiations.

Venezuela also fears that by notsigning, the banks would insist on bringing in the IMF. Officials said this would require the implementation of harsh policies, which would aggravate the 15 percent to 20 percent unemployment rate.