The San Francisco Planning Commission unanimously approved on Thursday a developer’s request to pay a fee rather than build three affordable housing units at a Valencia Street development.

Commissioners approved the project despite opposition from neighbors and issues raised by a recently released city audit, which concluded that a 2010 change to the fee option — allowing developers to pay the fee after the project is completed rather than up front — has led to the construction of fewer affordable units within new projects.

That trend takes away the benefits of having mixed-income units in new developments. It could also slow down the construction of new affordable housing, and may reduce the amount of interest the city receives, the audit found.

When the 17-unit mixed-used project was approved back in 2008, the previous developer agreed to construct three on-site affordable housing units. The new developer, 3900-19th Street LLC, wants to backtrack that decision because it would be more difficult to obtain financing if it is forced to build the units on site, according to Planning Department staff.

“It is very painful to give up on-site affordable housing,” said Commissioner Kathrin Moore.

Moore requested that Olson Lee, director of the Mayor’s Office of Housing, the agency that decides how to spend the affordable housing fund, give priority to projects in neighborhoods affected by gentrification.

Currently, a city ordinance requires developers of new buildings to dedicate 15 percent of their projects to inclusionary housing or pay a 20 percent fee that, once the project is completed, will go toward financing affordable housing elsewhere.

The developer agreed to pay the $1 million in-lieu fee up front rather than defer the payment until the project is complete, as other developers have done.

Commissioners said they supported the fee because the affordable housing fund has been depleted since the redevelopment agency was disbanded earlier this year.

“I am going to support this, but I am less than happy with the outcome,” Commissioner Gwyneth Borden said. “I wish it could go to housing in the immediate neighborhood.”

Commissioner Michael Antonini said he supported the project because it is “shovel-ready.” He also said he prefers the fee because he believes the city could get “more bang for our buck.”

To offset the loss of funds from the redevelopment agency, the mayor’s office is currently working on a “Housing Trust Fund.” The proposal, which will likely go before voters in November, would fund low- and middle-income housing in the city.