mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-01 15:32:11 +08:00
Merge pull request #8477 from Kilo-Org/docs/mistral-autocomplete-vscode-tabs
docs(kilo-docs): update Mistral autocomplete guide with VS Code/Legacy tabs
This commit is contained in:
@@ -2,6 +2,80 @@
|
||||
|
||||
This guide walks you through setting up Mistral's Codestral model for free autocomplete in Kilo Code. Mistral offers a free tier that's perfect for getting started with AI-powered code completions.
|
||||
|
||||
{% tabs %}
|
||||
{% tab label="VS Code" %}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- A [Kilo Code account](https://app.kilo.ai) (free to create)
|
||||
- A Mistral AI account with a Codestral API key
|
||||
|
||||
## Step 1: Navigate to Codestral in Mistral AI Studio
|
||||
|
||||
Go to the [Mistral AI console](https://console.mistral.ai/) and sign up or sign in to your account. In the sidebar, click **Codestral** under the Code section.
|
||||
|
||||

|
||||
|
||||
## Step 2: Generate API Key
|
||||
|
||||
Click the **Generate API Key** button to create your new Codestral API key.
|
||||
|
||||

|
||||
|
||||
## Step 3: Copy Your API Key
|
||||
|
||||
Once generated, click the **copy** button next to your API key to copy it to your clipboard.
|
||||
|
||||

|
||||
|
||||
{% callout type="note" %}
|
||||
The Codestral API key is separate from the standard Mistral La Plateforme API key. Make sure you generate a key specifically from the **Codestral** section of the Mistral console.
|
||||
{% /callout %}
|
||||
|
||||
## Step 4: Add Your Key via BYOK in Kilo
|
||||
|
||||
1. Log into the [Kilo platform](https://app.kilo.ai).
|
||||
2. Navigate to the [Bring Your Own Key (BYOK) page](https://app.kilo.ai/byok), available in the sidebar under **Account**.
|
||||
3. Click **Add Your First Key** (or **Add Key** if you already have keys configured).
|
||||
4. Select **Codestral** as the provider.
|
||||
5. Paste your Codestral API key.
|
||||
6. Click **Save**.
|
||||
|
||||
{% callout type="tip" %}
|
||||
For more details on BYOK, see the [Bring Your Own Key documentation](/docs/getting-started/byok).
|
||||
{% /callout %}
|
||||
|
||||
## Step 5: Verify Autocomplete is Working
|
||||
|
||||
Once your BYOK key is saved, Kilo Code's autocomplete will automatically use your Codestral key through the Kilo Gateway. No additional configuration is needed in the extension.
|
||||
|
||||
1. Open VS Code with the Kilo Code extension installed.
|
||||
2. Start typing in any code file — you should see inline ghost-text suggestions powered by Codestral.
|
||||
3. Press `Tab` to accept a suggestion.
|
||||
|
||||
The autocomplete status bar in VS Code shows the current provider ("Kilo Gateway") and tracks cumulative cost. With BYOK, requests are billed directly by Mistral at their rates (Codestral has a free tier) and show as $0.00 on your Kilo balance.
|
||||
|
||||
## How It Works
|
||||
|
||||
When you add a Codestral BYOK key, the request flow is:
|
||||
|
||||
```
|
||||
Your Editor → Kilo Gateway (with your key) → Mistral
|
||||
```
|
||||
|
||||
- The Kilo Gateway detects your BYOK key and routes autocomplete requests using it.
|
||||
- You are billed directly by Mistral — Kilo does not add any markup.
|
||||
- If your BYOK key is invalid, the request will fail (it does not fall back to Kilo's keys).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- **Autocomplete not appearing?** Check that autocomplete is enabled in Kilo Code settings (it is on by default). Also verify you are signed into Kilo Code in the extension.
|
||||
- **Key not working?** Ensure you copied the **Codestral** API key (not the standard La Plateforme key). You can verify your key at [console.mistral.ai/codestral](https://console.mistral.ai/codestral).
|
||||
- **Seeing charges on your Kilo balance?** If you haven't configured BYOK, autocomplete defaults to using your Kilo credits. Add your Codestral key via BYOK to route requests through your own Mistral account.
|
||||
|
||||
{% /tab %}
|
||||
{% tab label="VS Code Legacy" %}
|
||||
|
||||
## Video Walkthrough
|
||||
|
||||
{% youtube url="https://www.youtube.com/embed/0aqBbB8fPho" caption="Setting up Mistral for free autocomplete in Kilo Code" /%}
|
||||
@@ -74,6 +148,9 @@ Click **Save** to apply your Mistral configuration. You're now ready to use free
|
||||
|
||||

|
||||
|
||||
{% /tab %}
|
||||
{% /tabs %}
|
||||
|
||||
## Next Steps
|
||||
|
||||
- Learn more about [Autocomplete features](/docs/code-with-ai/features/autocomplete)
|
||||
|
||||
@@ -20,9 +20,9 @@ Because Autocomplete needs to be ready the moment you start typing, the model st
|
||||
|
||||
#### How much does it cost?
|
||||
|
||||
You can use Codestral 2508 for Autocomplete completely for free by configuring it through our Mistral integration.
|
||||
You can use Codestral for Autocomplete without consuming Kilo credits by adding your own Mistral Codestral API key via BYOK (Bring Your Own Key). Mistral offers a free tier for Codestral.
|
||||
|
||||
**Setup Guide:** [Setting up Mistral for Free Autocomplete](/docs/code-with-ai/features/autocomplete/mistral-setup#setting-up-mistral-for-free-autocomplete)
|
||||
**Setup Guide:** [Setting Up Mistral for Free Autocomplete](/docs/code-with-ai/features/autocomplete/mistral-setup)
|
||||
|
||||
#### How to Disable These Requests
|
||||
|
||||
|
||||
@@ -64,9 +64,9 @@ If you run out of credits and haven't configured a free alternative, autocomplet
|
||||
|
||||
### How to Get It Free
|
||||
|
||||
Configure Mistral directly as your autocomplete provider. Mistral offers free access to their Codestral model, which is optimized for code completions. When you configure Mistral directly, it takes precedence over the default Kilo Code routing.
|
||||
Add your own Mistral Codestral API key via **BYOK (Bring Your Own Key)** on the Kilo Gateway. Mistral offers a free tier for Codestral, and when you configure a BYOK key, autocomplete requests are routed using your key — billed directly by Mistral at $0 on your Kilo balance.
|
||||
|
||||
For step-by-step instructions with screenshots, see our [Mistral Setup Guide](/docs/code-with-ai/features/autocomplete/mistral-setup).
|
||||
For step-by-step instructions, see our [Mistral Setup Guide](/docs/code-with-ai/features/autocomplete/mistral-setup).
|
||||
|
||||
## Free CLI Background Tasks
|
||||
|
||||
@@ -99,6 +99,6 @@ Replace `your-preferred-free-model` with any free model available in the model p
|
||||
## Related Resources
|
||||
|
||||
- [Free and Budget Models](/docs/code-with-ai/agents/free-and-budget-models) - Complete guide to free and budget-friendly model options
|
||||
- [Mistral Setup Guide](/docs/code-with-ai/features/autocomplete/mistral-setup) - Step-by-step free autocomplete setup
|
||||
- [Mistral Setup Guide](/docs/code-with-ai/features/autocomplete/mistral-setup) - Step-by-step autocomplete setup via BYOK
|
||||
- [Autocomplete](/docs/code-with-ai/features/autocomplete) - Full autocomplete documentation
|
||||
- [CLI Documentation](/docs/code-with-ai/platforms/cli) - Complete CLI reference
|
||||
|
||||
Reference in New Issue
Block a user