Logo

azure-openai

#10056

invalid_property_error

Additional properties are not allowed. Unexpected property found in the input.

This error has been identified and solved.

Reason

The "400 Bad Request" error with the message "Additional properties are not allowed ('functions' was unexpected) - 'messages.0'" in the Azure OpenAI API is likely due to several possible reasons:

Invalid Request Configuration

The request payload may contain properties that are not allowed or expected by the API. Specifically, the presence of a 'functions' property within the 'messages' array is unexpected and violates the API's schema requirements.

Incorrect Payload Structure

The structure of the payload, particularly the 'messages' array, may not conform to the expected format defined by the OpenAI API. This could include having additional or unexpected fields that are not recognized by the API.

API Schema Compliance

The request may be violating the specific schema or constraints defined by the OpenAI API, which does not allow certain properties like 'functions' in the context of the 'messages' array.

API Version and Endpoint Issues

There could be discrepancies between the API version or endpoint being used and the expectations of the API, leading to incompatible request structures.

Solution

To fix the "400 Bad Request" error with the message "Additional properties are not allowed ('functions' was unexpected) - 'messages.0'" in the Azure OpenAI API, you need to ensure your request payload complies with the API's expected schema.

Here are the key steps to resolve this issue:

  • Remove unexpected properties: Ensure that the 'messages' array does not contain any properties that are not allowed, such as 'functions'.

  • Correct payload structure: Verify that the structure of the 'messages' array conforms to the expected format defined by the OpenAI API.

  • Check API version and endpoint: Make sure you are using the correct API version and endpoint to avoid compatibility issues.

  • Refer to API documentation: Consult the Azure OpenAI API documentation to ensure your request body matches the required schema.

Original Error Message

Raw

Additional properties are not allowed. Unexpected property found in the input.

Original Error Message

Raw

Additional properties are not allowed. Unexpected property found in the input.

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →