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:
npx vercel ai-gateway setup --agent vibeThe 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:
Go to the AI Gateway section in the Vercel dashboard sidebar and click API keys to create a new API key.
Export the key in your shell:
Terminalexport AI_GATEWAY_API_KEY="your-ai-gateway-api-key"To persist the key, add the same line to your shell's startup file.
Add the provider and model entries to
~/.vibe/config.toml:~/.vibe/config.tomlactive_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_varkeeps 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.Open a new terminal so the key is loaded, then run:
TerminalvibeSwitch 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.
| Variable | Description |
|---|---|
AI_GATEWAY_API_KEY | Your AI Gateway API key, named by api_key_env_var. Required |
VIBE_HOME | Overrides the config directory. Defaults to ~/.vibe |
- Browse the models catalog for available models
- Configure spend limits on your API key
Was this helpful?