OpenAI's code quality leaves to be desired, which is surprising considering how well compensated their engineers are.
Their recent realtime demo had so many race conditions, function calling didn't even work, and the patch suggested by the community hasn't been merged for a week.
https://github.com/openai/openai-realtime-api-beta/issues/14