⚙️ Mistral AI Provider Setup
Connect Mistral AI models with Flexpilot, your AI code assistant in VS Code, similar to GitHub Copilot. Follow this concise setup guide to get started quickly!
🔑 Getting API Key
- Visit the Mistral AI Console and sign in or create a new account.
- Navigate to
Codestral
section in your account settings and copy the Codestral API key. - If using the Mistral endpoint instead, navigate to
API Keys
section and create a new key for the Mistral endpoint.
NOTE
Its recommended to use the Codestral endpoint for better performance and model availability in Flexpilot.
🛠️ Configuration
Open Flexpilot Settings in VS Code:
- Press
Ctrl+Shift+P
(Windows) orCmd+Shift+P
(Mac). - Select
Flexpilot: Configure the Language Model Provider
. - Choose
Add New Configuration
. - Select
Mistral AI
(options:mistral-chat
ormistral-completion
) as the provider.
- Press
Enter a nickname when prompted. Pressing Escape will cancel the model configuration.
Input the Mistral API endpoint when prompted.
NOTE
Use https://codestral.mistral.ai
or https://api.mistral.ai
based on your preference.
- Enter your API Key when prompted.
NOTE
If using the Codestral endpoint, input the Codestral API key; otherwise, use the Mistral API key.
- Enter the Mistral Model Name when prompted.
NOTE
Models via the Codestral endpoint must start with codestral-
. Refer to the models overview for the correct model name.
📌 Important Notes
- 🔒 Security: Always keep your API key private.
- 💳 Usage & Billing: You’ll be billed per token (input & output). Check Mistral AI's Pricing for detailed rates.
- 💼 Model Availability: Some models may have different pricing tiers, so choose accordingly.
🚫 Troubleshooting
- API Key Issues: Ensure your API key is accurate and saved.
- Credit Balance: Confirm you have enough credits for API usage.
- Model Availability: Check if the selected model is supported in your region.
For further assistance, refer to Mistral AI's Documentation for API usage, limits, and best practices.