
openai
#10543
unsupported_value_error
Unsupported value: The specified role is not supported with this model.
This error has been identified and solved.
Reason
The error you're encountering, Unsupported value: 'messages.role' does not support 'developer' with this model.
, is due to the following reasons:
The role specified in your message configuration, namely 'developer', is not supported by the OpenAI model you are using. Specifically, models like 'o1-preview' and 'o1-mini' do not support the 'developer' role.
The valid roles for these models are limited to specific values such as
SYSTEM
,USER
,ASSISTANT
,FUNCTION
,TOOL
,CHATBOT
, andMODEL
, but 'developer' is not among them.
Solution
To fix the Unsupported value: 'messages.role' does not support 'developer' with this model
error, you need to adjust the role specified in your message configuration to one of the supported roles. Here are the steps to resolve this issue:
Replace the 'developer' role with one of the valid roles.
Use one of the following supported roles:
SYSTEM
,USER
,ASSISTANT
,FUNCTION
,TOOL
,CHATBOT
, orMODEL
.
Ensure that your message configuration aligns with these supported roles to avoid the BadRequestError
.
Suggested Links
https://cheatsheet.md/chatgpt-cheatsheet/openai-api-error-axioserror-request-failed-status-code-400
https://github.com/run-llama/llama_index/issues/17395
https://community.openai.com/t/getting-400-response-with-already-working-code/509212
https://community.openai.com/t/o1-models-do-not-support-system-role-in-chat-completion/953880
https://community.openai.com/t/intermittent-error-an-unexpected-error-occurred-error-code-400-error-message-this-model-does-not-support-specifying-dimensions-type-invalid-request-error-param-none-code-none/955807
https://community.openai.com/t/i-am-receiving-an-error-status-code-400/351121
https://community.make.com/t/receiving-unsupported-parameter-logit-bias-error-with-openai-o1-model/64208