
mistral-ai
#10140
model_selection_error
Invalid model: The specified model is not recognized or unavailable. Please verify the model name.
This error has been identified and solved.
Reason
The `` status error in the Mistral AI API, specifically the "Invalid model: mistral-medium" error, is typically due to the following reasons:
Invalid Model Specification
The model specified (mistral-medium
) may not be recognized or supported by the Mistral AI API. This could be because the model is not listed in the permitted models as per the API documentation.
API Configuration or Syntax Issues
The request to the API might contain invalid syntax or configuration, such as incorrect headers, invalid API keys, or improperly formatted data payloads, leading to a "Bad Request" response from the server.
Rate Limiting or Throttling
Although less likely in this specific case, rate limiting or throttling issues can sometimes result in a 400 error if the API requests exceed the allowed limits within a given time frame.
API Compatibility Issues
There might be compatibility issues between the API client and the Mistral AI API, such as differences in expected API structure or parameters, which can cause the request to be malformed.
Solution
To fix the "Invalid model: mistral-medium" error in the Mistral AI API, you need to ensure the following:
Verify the model name: Check the Mistral AI API documentation to confirm that
mistral-medium
is a valid and supported model.Check API keys and configuration: Ensure your API key is correct, not expired, and that the request headers and data payload are properly formatted.
Review API compatibility: Make sure your API client is compatible with the Mistral AI API structure and parameters.
Monitor rate limits: Although less likely, verify that you are not exceeding the API rate limits.
By addressing these points, you can resolve the "Invalid model" error and ensure your API requests are processed correctly.
Suggested Links
https://cheatsheet.md/chatgpt-cheatsheet/openai-api-error-axioserror-request-failed-status-code-400
https://community.make.com/t/400-invalid-model/59048
https://forum.cloudron.io/topic/11826/using-mistral-api-seems-broken-on-cloudron
https://community.make.com/t/400-invalid-model-llama-3-8b-instruct-how-is-that-possible-if-it-is-actually-permitted/53562
https://github.com/langchain-ai/langchain/issues/16869
https://github.com/cline/cline/issues/938
https://www.restack.io/p/mistral-inference-answer-rate-limits-cat-ai
https://github.com/microsoft/autogen/issues/991