Mistral Vibe + GLM-5.2 Setup#
How to run Z.ai GLM-5.2 — the open-weights model Mistral has hosted on La Plateforme since 2026-08-11 — as the coding agent in Mistral Vibe, both in the CLI and the VS Code extension.
Vibe is the agent formerly called Le Chat; its coding surface (vibe for code)
ships as a CLI and a VS Code extension. GLM-5.2 is not a Mistral model — it is a
third-party open model running on Mistral’s infrastructure, under the same
regional controls and service commitments as Mistral’s own models.
Why this page lives here. The Kataglyphis repos are worked on by AI coding agents. This is the setup guide for one of them, so any contributor (human or agent) can reproduce the working config without reverse-engineering it from a log file. The errors and fixes in the troubleshooting table were all found live on 2026-08-28 — including two that produce no log entry, only garbled TUI output.
Prerequisites#
Need |
Where |
|---|---|
Mistral Vibe CLI |
|
Mistral account + API key |
console.mistral.ai/api-keys (La Plateforme / Mistral Studio) |
VS Code ≥ 1.94.0 |
only if you want the IDE panel — the CLI works standalone |
Verify the CLI is on PATH after install:
vibe --version
1. Get a Mistral API key#
Sign in at console.mistral.ai.
Go to API Keys and create a new key.
Copy it immediately — it is shown once.
A real Mistral key is roughly 32 alphanumeric characters. If what you have is
shorter or reads like a placeholder (DEIN…, your-key-here), it is not a real
key and every request will fail with HTTP 401.
2. Write ~/.vibe/config.toml#
Vibe stores its config in ~/.vibe/config.toml (Windows: %USERPROFILE%\.vibe\config.toml).
The block below is the known-good config for GLM-5.2 on the EU endpoint:
active_model = "zai-glm-5-2"
[[providers]]
name = "mistral-eu"
api_base = "https://api.eu.mistral.ai/v1"
api_key_env_var = "MISTRAL_API_KEY"
api_style = "openai"
backend = "mistral"
[[models]]
name = "zai-glm-5-2"
provider = "mistral-eu"
alias = "zai-glm-5-2"
display_name = "Z.ai GLM 5.2"
temperature = 1.0
thinking = "off"
supports_images = false
input_price = 1.4
output_price = 4.4
cached_input_price = 0.14
auto_compact_threshold = 800000
Field reference#
Field |
Value |
Why |
|---|---|---|
|
|
The exact model ID the Mistral API expects. Not |
|
|
Matches the |
|
|
Uses the official Mistral SDK backend, which maps Vibe thinking levels to the API’s |
|
|
What shows in the model picker. Keep it identical to |
|
|
Human-readable label in the picker. Optional but useful when multiple models are configured. |
|
|
GLM-5.2’s model card lists no reasoning mode. Setting any non- |
|
|
GLM-5.2 is text-only. |
|
|
Cost per million input tokens (USD). Lets Vibe track session cost. From the model card. |
|
|
Cost per million output tokens (USD). |
|
|
Cost per million cached input tokens (USD). |
|
|
The model has a 1M-token context window. Compact at 800K to leave headroom. |
|
|
Must not be empty — an empty |
3. Set the API key#
The key is not stored in config.toml. Vibe reads it from the environment
variable named by api_key_env_var (here MISTRAL_API_KEY). The easiest way to
set it persistently is the built-in setup flow:
vibe --setup
This opens a terminal prompt; paste the key from step 1. Vibe writes it to
~/.vibe/.env and future sessions pick it up automatically.
To verify the key is loaded without starting an interactive session:
# quick smoke test — model replies and exits
vibe -p "Reply with: OK" --max-turns 1 --auto-approve --output text
4. VS Code extension (optional)#
The Mistral Vibe VS Code extension (mistralai.mistral-vibe-code, on the
Marketplace) runs the same bundled agent as the CLI. It reads the same
~/.vibe/config.toml and ~/.vibe/.env, so once the CLI is configured the
extension picks up GLM-5.2 with no extra setup.
To install from inside VS Code:
Ctrl+Shift+Xto open Extensions.Search Mistral Vibe.
Install the one published by Mistral AI (
mistralai).Open the Vibe panel from the activity bar, or run Mistral Vibe: Open Mistral Vibe from the Command Palette.
If the extension needs credentials and none are configured yet, it opens a
terminal setup flow that runs vibe --setup — step 3 above.
Troubleshooting#
Every row below was hit live on 2026-08-28. The log is at
~/.vibe/logs/vibe.log.
Symptom (log message) |
Cause |
Fix |
|---|---|---|
|
Wrong model ID in |
Set |
|
|
Run |
|
Same root cause — the bad key fails before any model call. |
Same fix — set the key. These warnings clear once auth works. |
Garbled / strange output in the TUI (no log entry; the model answers but the display is wrong) |
|
Set |
Startup warning about |
|
Set |
No model selected on startup; |
|
Set |
Model not in the picker at all |
|
Ensure |
Quick health check#
# 1. is the CLI installed?
vibe --version
# 2. is the key set in this shell? (prints its length only, never the key;
# 0 is fine when vibe --setup stored it in ~/.vibe/.env instead)
echo "${#MISTRAL_API_KEY}"
# 3. does the model answer?
vibe -p "Reply with: OK" --max-turns 1 --auto-approve --output text
If step 3 prints OK, the full chain — key, endpoint, model ID — is correct.
References#
GLM-5.2 model card (features, context, pricing): https://docs.mistral.ai/models/zai-glm-5-2
Mistral Vibe product page: https://mistral.ai/products/vibe/code/
VS Code extension — install & auth: https://docs.mistral.ai/vibe/code/vs-code-extension/install-authenticate
Vibe CLI configuration: https://docs.mistral.ai/vibe/code/cli/configuration
Reasoning on Mistral (
reasoning_effortparameter, supported models): https://docs.mistral.ai/studio/conversations/reasoningGLM-5.2 on Mistral announcement (2026-08-11): https://mistral.ai/news/regional-inference-open-models-new-compute/
API keys: https://console.mistral.ai/api-keys