
azure-openai
#10055
input_validation_error
Additional properties are not allowed. Unexpected properties encountered in the input payload.
This error has been identified and solved.
Reason
The 400
status error in the Azure OpenAI API, specifically the message "Additional properties are not allowed ('question', 'question_variations' were unexpected) - 'messages.0'," indicates that the request contains properties that are not recognized or allowed by the API.
Here are the key reasons for this error:
Invalid Request Configuration: The request includes fields or properties that do not match the expected schema or structure defined by the API. In this case, the properties
question
andquestion_variations
are not expected in themessages
section of the request.API Endpoint and Version Issues: There might be discrepancies between the request format and what is expected by the specific API endpoint or version being used. The API may have changed or have strict requirements for the request structure that are not being met.
Content and Policy Violations: Although less likely in this context, it could also indicate that the content of the request is not compliant with the API's content management policies, leading to the rejection of the request.
Solution
To resolve the 400
status error in the Azure OpenAI API due to unexpected properties in the messages
section, you need to ensure your request conforms to the API's expected format.
Here are the steps to fix the issue:
Remove the unexpected properties (
question
andquestion_variations
) from themessages
section.Verify that the request structure matches the expected schema defined by the API.
Check the API documentation for the specific endpoint and version you are using to ensure compliance.
Ensure all properties included in the request are valid and recognized by the API.
By aligning your request with the API's requirements, you should be able to avoid the "Additional properties are not allowed" error.
Suggested Links
https://portkey.ai/error-library/prompt-error-10016
https://community.openai.com/t/content-is-required-property-error-400/486260
https://github.com/FlowiseAI/Flowise/issues/195
https://cheatsheet.md/chatgpt-cheatsheet/openai-api-error-axioserror-request-failed-status-code-400
https://github.com/Azure/azure-sdk-for-net/issues/43953
https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/openai/azure-ai-openai/TROUBLESHOOTING.md
https://github.com/danny-avila/LibreChat/discussions/3115
https://learn.microsoft.com/en-us/answers/questions/2139738/openai-badrequesterror-error-code-400-((error-((me
https://community.openai.com/t/azure-open-ai-assistant-api-connection-error/662198