Since the Bay Area Pollution Control District banned all backyard burning way back in the 1960s, I have always assumed firepits are completely illegal in the immediate Bay Area. When i was little, every house tended to have an incinerator in the backyard. Sometimes concrete and brick, or just an open 50 gallon barrel. We moved into a brand new development in Mtz in 1962 and it had one there, I still remember burning the trash with big sis (I was too young to play with matches, etc).
I would be very surprised if they were legal. My neighbor, who is an idiot, tried to burn green wood in his to get rid of a branch that fell. Grouchy neighbor on other side had the FD there within the hour.
That said, it's worth a try but I wouldn't spend a fortune landscaping around it till you try it a couple of times and see whether your neighbors are snitchy. I have thought about it but since that neighbor incident, I think the opportunity is ruined by his smoke. Every firepit I have experienced has been out of the counties surrounding the bay, like up north and such.
We all know that smokin' meat and using wood or charcoal bbq probably generates just as much smoke, but I think the open flame of a firepit might be somehow "more" illegal than a 'cue.