Logo

azure-openai

#10033

model_operation_error

The specified model is incompatible with the chosen operation. Please select a different model and try again. Learn more about compatible models with operations here: https://go.microsoft.com/fwlink/?linkid=2197993.

This error has been identified and solved.

Reason

The 400 status error in the Azure OpenAI API, specifically the error message indicating that the chatCompletion operation does not work with the text-embedding-ada-002 model, is due to several key reasons:

Incorrect Model Usage

The text-embedding-ada-002 model is not compatible with the chatCompletion operation. This operation only supports specific models, such as gpt-3.5-turbo and gpt-3.5-turbo-0301, and not text embedding models.

API Request Configuration

The error could also be a result of an incorrectly configured API request. This includes issues such as invalid or missing required properties in the request payload, incorrect headers, or an incorrect base URL.

Model and Operation Compatibility

The specified model (text-embedding-ada-002) is designed for embedding tasks and is not suitable for chat completion operations, which require different types of models.

Solution

To fix the 400 status error in the Azure OpenAI API, you need to address the following issues:

  • Use a compatible model: Switch to a model that is supported for the chatCompletion operation, such as gpt-3.5-turbo or gpt-3.5-turbo-0301.

  • Ensure correct API request configuration: Verify that your request payload, headers, and base URL are correctly configured.

  • Check the request payload structure: Make sure the messages array and other required properties in the request body are properly formatted.

Here are the key actions to take:

  • Change the model to gpt-3.5-turbo or gpt-3.5-turbo-0301.

  • Review and correct the API request payload and headers.

  • Validate the base URL and API version used in the request.

Original Error Message

Raw

The specified model is incompatible with the chosen operation. Please select a different model and try again. Learn more about compatible models with operations here: https://go.microsoft.com/fwlink/?linkid=2197993.

Original Error Message

Raw

The specified model is incompatible with the chosen operation. Please select a different model and try again. Learn more about compatible models with operations here: https://go.microsoft.com/fwlink/?linkid=2197993.

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →