Skip to content
Docs

Mistral Vibe with AI Gateway

Mistral Vibe is Mistral AI's terminal coding agent. It reads a TOML config at $VIBE_HOME/config.toml (default ~/.vibe), whose custom providers you can point at AI Gateway for unified model access and spend monitoring.

Run the Vercel CLI setup command for Mistral Vibe:

terminal
npx vercel ai-gateway setup --agent vibe

The command writes the gateway provider and an unaliased [[models]] shortlist into $VIBE_HOME/config.toml, with Mistral's top models first and the leaderboard's most-used models after them. It pins active_model to the leading Mistral model. Re-run the command to refresh the list.

If you can't use the Vercel CLI, configure Mistral Vibe manually:

  1. Go to the AI Gateway section in the Vercel dashboard sidebar and click API keys to create a new API key.

  2. Export the key in your shell:

    Terminal
    export AI_GATEWAY_API_KEY="your-ai-gateway-api-key"

    To persist the key, add the same line to your shell's startup file.

  3. Add the provider and model entries to ~/.vibe/config.toml:

    ~/.vibe/config.toml
    active_model = "openai/gpt-6-astra"
     
    [[providers]]
    name = "vercel-ai-gateway"
    api_base = "https://ai-gateway.vercel.sh/coding-agent/v1"
    api_key_env_var = "AI_GATEWAY_API_KEY"
    api_style = "openai"
    backend = "generic"
     
    [[models]]
    name = "openai/gpt-6-astra"
    provider = "vercel-ai-gateway"

    api_key_env_var keeps the key in the shell environment, so it never lands in the file. Model entries must be unaliased because Vibe resolves [[models]] names against the provider list. The picker scrolls without type-to-filter, so keep the shortlist focused.

  4. Open a new terminal so the key is loaded, then run:

    Terminal
    vibe

    Switch models with /model. Vibe's own Mistral models are listed first, followed by the shortlisted gateway models.

View your usage, spend, and request activity in the AI Gateway section in the Vercel dashboard sidebar. See the observability documentation for more details.

VariableDescription
AI_GATEWAY_API_KEYYour AI Gateway API key, named by api_key_env_var. Required
VIBE_HOMEOverrides the config directory. Defaults to ~/.vibe

Mistral Vibe calls AI Gateway through the OpenAI-compatible Chat Completions API, so any model that supports Chat Completions works.

Last updated September 13, 2026

Was this helpful?

supported.