You may also want to change the version of the OpenAI api, at least for me it was a blocker to not able to use structured outputs.
I changed env variable from 2024-03-01-preview to 2024-08-01-preview, and it worked.