Logo

openai

#10523

unsupported_value_error

The provided value for 'messages[0].role' is not supported with the current model configuration.

This error has been identified and solved.

Reason

The error you're encountering, specifically the "Unsupported value: 'messages.role' does not support 'system' with this model," is due to the following reasons:

Model Limitations

  • Certain OpenAI models, such as the 'o1-preview' and 'o1-mini' models, do not support the 'system' role in chat completion. This is a limitation of these specific models.

Invalid Role Specification

  • The role specified in your message configuration ('system') is not one of the supported roles for the model you are using. These models only support roles like 'SYSTEM', 'USER', 'ASSISTANT', and others, but not 'system' or other unsupported roles.

Solution

To fix the "Unsupported value: 'messages.role' does not support 'system' with this model" error, you need to ensure that the role specified in your message configuration aligns with the supported roles of the model you are using.

Here are the steps to resolve this issue:

  • Use a different model that supports the 'system' role, such as models other than 'o1-preview' and 'o1-mini'.

  • Replace the 'system' role with one of the supported roles for your model, such as 'USER', 'ASSISTANT', or other valid roles.

  • Check the documentation for the specific model you are using to confirm the supported roles.

Original Error Message

Raw

The provided value for 'messages[0].role' is not supported with the current model configuration.

Original Error Message

Raw

The provided value for 'messages[0].role' is not supported with the current model configuration.

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →