I think the documentation does not correctly specify how to supply the schema in the API call for structure output.
https://platform.openai.com/docs/guides/structured-outputs/how-to-use?lang=node.js
In the documentation it says under “Step 2: Supply your schema in the API call”:
response_format: { “type”: “json_schema”, “json_schema”: … ,“strict”: true }.
This leads to an error 400 when doing the api call (Unknown parameter: ‘response_format.strict’:
The correct way is to omit that parameter and only include strict: true in your json schema.