
cohere
#10147
unsupported_model_error
Invalid request: the specified model is not supported by the API. Please verify the model name and version.
This error has been identified and solved.
Reason
The 400 status error you are encountering, specifically the message "invalid request: model 'embed-english-v2.0' is not supported by the generate API," indicates that the model you are trying to use (embed-english-v2.0
) is not compatible with the API endpoint you are calling. This is because the generate
API does not support embedding models like embed-english-v2.0
, which are likely intended for different types of operations, such as generating embeddings rather than generating text.
Solution
To resolve the 400 status error due to the specified model not being supported by the API, you need to ensure you are using the correct API endpoint and model type for your intended operation. Here are the key steps to fix this issue:
Use the appropriate API endpoint: Ensure you are using the embedding API if you need embeddings, or the generate API if you need text generation.
Select a supported model: Choose a model that is compatible with the API endpoint you are using. For example, use
generate
models likecommand
,command-light
, etc., for text generation, andembed-english-v3.0
,embed-multilingual-v3.0
, etc., for generating embeddings.Check model versions: Verify that the model version you are using is supported by the Cohere API.
Refer to documentation: Consult the Cohere documentation to ensure you have the correct model names and versions.