Setting Up Mistral for Free Autocomplete

This guide walks you through setting up Mistral's Codestral model for free autocomplete in Voyager Code. Mistral offers a free tier that's perfect for getting started with AI-powered code completions.

Prerequisites

Step 1: Navigate to Codestral in Mistral AI Studio

Go to the Mistral AI console and sign up or sign in to your account. In the sidebar, click Codestral under the Code section.

Select Codestral

Step 2: Generate API Key

Click the Generate API Key button to create your new Codestral API key.

Confirm Generate

Step 3: Copy Your API Key

Once generated, click the copy button next to your API key to copy it to your clipboard.

Copy API Key

📝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.

Step 4: Add Your Key via BYOK in Voyager

  1. Log into the Voyager platform.
  2. Navigate to the Bring Your Own Key (BYOK) page, 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.
💡Tip

For more details on BYOK, see the Bring Your Own Key documentation.

Step 5: Verify Autocomplete is Working

Once your BYOK key is saved, Voyager Code's autocomplete will automatically use your Codestral key through the Voyager Gateway. No additional configuration is needed in the extension.

  1. Open VS Code with the Voyager 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 ("Voyager 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 Voyager balance.

How It Works

When you add a Codestral BYOK key, the request flow is:

Your Editor → Voyager Gateway (with your key) → Mistral
  • The Voyager Gateway detects your BYOK key and routes autocomplete requests using it.
  • You are billed directly by Mistral — Voyager does not add any markup.
  • If your BYOK key is invalid, the request will fail (it does not fall back to Voyager's keys).

Troubleshooting

  • Autocomplete not appearing? Check that autocomplete is enabled in Voyager Code settings (it is on by default). Also verify you are signed into Voyager 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.
  • Seeing charges on your Voyager balance? If you haven't configured BYOK, autocomplete defaults to using your Voyager credits. Add your Codestral key via BYOK to route requests through your own Mistral account.

Next Steps