openai
#10014
invalid_parameter_error
Invalid parameter: the specified response format is not supported with the current model.
This error has been identified and solved.
Reason
The error you're encountering, Invalid parameter: "response_format" of type "json_object" is not supported with this model, indicates that the specific model you are using with the OpenAI API does not support the response_format parameter set to json_object. This is because some models or endpoints in the OpenAI API have specific requirements or limitations on the parameters they accept, and response_format: json_object is not compatible with the model you are currently using.
Solution
To fix the 400 status error due to the response_format parameter not being supported with the current model, you can take the following steps:
Remove the
response_formatparameter: This will allow the API to default to the standard text format supported by all models.Change the model: Switch to a model that supports the
json_objectresponse format, if such a model is available.Ensure compatibility: Verify that the model you are using is compatible with the
response_formatyou are specifying, and adjust accordingly.
By doing one of these, you should be able to resolve the error related to the unsupported response_format.



