Structured output outputs the schema instead of an object

I keep getting issue with structured output where instead of outputting the json content as defined in the schema, it instead outputs the schema object itself.

For some reason this happens more with gpt-4o-2024-08-06 than with gpt-4o-mini-2024-07-18.

If I add a user message telling it to process into a json object then it seems to fix it but the docs say that is only required for json object mode.

Seems like a bug.