Code Completions ✨
Supercharge your coding workflow with Flexpilot's AI-powered code completions. This guide covers everything you need to know about configuring and customizing the completion models to enable code suggestion while you type.
🎁 Free Getting Started
Get started instantly with Codestral's generous free tier! Their codestral-latest
model provides high-quality completions without any payment required.
Setting Up Your Model
Flexpilot supports multiple AI providers that are compatible with the OpenAI API format, including OpenAI Instruct Models, Mistral AI (Codestral), Ollama, and other OpenAI-compatible providers. To configure your preferred provider, follow these steps:
Open the command palette:
- Windows/Linux:
Ctrl + Shift + P
- macOS:
Cmd + Shift + P
- Windows/Linux:
Search for
Flexpilot: Configure the Language Model Provider
Select
Edit Completions Config
📝 Configuration Fields Explained
Field | Description | Recommended Value |
---|---|---|
API Base URL | Provider's API endpoint | https://api.openai.com/v1 or https://codestral.mistral.ai/v1/fim |
API Key | Your authentication key | Obtain from provider |
Model ID | Specific model identifier | gpt-3.5-turbo-instruct or codestral-latest |
Max Output Tokens | Maximum generated tokens | 500 |
Max Input Tokens | Maximum context window | 4000 (model context - output tokens) |
Temperature | Output randomness (0-1) | 0.2 |
Debounce Wait | Delay before completion (ms) | 200-500 |
⚠️ Important
Keep your API keys secure and never commit them to version control!
Managing Completions
Status Indicator
The Flexpilot logo in the bottom-right corner shows the current completion status:
- 🔄 Spinning: Fetching completions
- ⚡ Normal: Ready for next completion
Enable / Disable
To control code completions, click the Flexpilot icon in the bottom-right corner of the editor. This opens the Quick Controls menu, where you can toggle completions globally or for specific languages.
Quick Controls
- Global Toggle: Enable/disable completions across all workspaces
- Language Settings: Toggle completions for the current file type
TIP
You can quickly disable completions for specific languages while keeping them enabled globally. This is useful when you want to temporarily turn off suggestions for certain file types.