Such hybrid restaurants are spreading to other high-cost cities, and they fit what analysts say is growing demand for more flexible dining options. But here, the extreme economics have rapidly made the model commonplace.

San Francisco’s tech riches have fed demand for restaurants — and some wealthy tech workers have decided they would also like to be partners in a restaurant, opening up more investment. But as those highly paid workers have also driven demand for scarce housing, the city has struggled to keep lower-wage workers afloat.

On July 1, the minimum wage in San Francisco will hit $15 an hour, following incremental raises from $10.74 in 2014. The city also requires employers with at least 20 workers to pay health care costs beyond the mandates of the Affordable Care Act, in addition to paid sick leave and parental leave.

Despite those benefits, many workers say they can’t afford to live here, or to stay in the industry. And partly as a result of those benefits, restaurateurs say they can’t afford the workers who remain. A dishwasher can now make $18 or $19 an hour. And because of California labor laws, even tipped workers like servers earn at least the full minimum wage, unlike their peers in most other states.

Enrico Moretti, an economist at the University of California, Berkeley, estimates that when housing prices rise by 10 percent, the price of local services, including restaurants , rises by about 6 percent. (The median home price in San Francisco has doubled since 2012.)

So burgers get more expensive as houses do. But even wealthy tech workers will pay only so much to eat one. “If we were to pay what we need to pay people to make a living in San Francisco, a $10 hamburger would be a $20 hamburger, and it wouldn’t make sense anymore,” said Anjan Mitra, who owns two high-end Indian restaurants in the city, both named Dosa. “Something has to give.”