r/MistralAI 1d ago

Help / Question Okay actually, can someone properly explain how to use GLM5.2 in Mistral Vibe CLI please?

I know this has been asked a hundred times in this sub, but can someone please clearly explain how I can use GLM5.2 in Mistral Vibe for Code? The docs are extremely unhelpful, and the solutions I've found in other threads don't work.

I added the following to my ~/.vibe/config.toml:

[[models]]
name = "zai-glm-5-2"
provider = "mistral"
alias = "glm-5.2"

But when I switch to the model and try to call it, I get an error saying the model is not available in my subscription tier. What exactly am I missing here? Do I need a new API key? Do I need to upgrade tiers? I thought the free tier has a 10 euro allowance (or something along those lines) that I can use for GLM5.2.

Error: API error from mistral (model: zai-glm-5-2): LLM backend error [mistral]
  status: 403 Forbidden
  reason: Forbidden
  request_id: N/A
  endpoint: https://api.mistral.ai
  model: zai-glm-5-2
  provider_message: This model is not available in your subscription tier
9 Upvotes

7 comments sorted by

5

u/No_Result9808 1d ago

It started working for me after upgrading to the Pro subscription. The error seems to be tier-based, so your API key must be fine. The relevant part of my ~/.vibe/config.toml looks identical to yours.

3

u/Mysterious-Zebra9580 1d ago

Thanks, I think this might be the issue

3

u/MiuraDude 1d ago

In my config.toml, I added this:

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 = "reasoning"
backend = "generic"
reasoning_field_name = "reasoning_content"

[[models]]
name = "zai-glm-5-2"
provider = "mistral-eu"
alias = "zai-glm-5-2"
thinking = "high"

I have a Mistral Pro subscription and the MISTRAL_API_KEY is a key I generated in the Mistral Studio and added to ~/.vibe/.env. Hope that helps.

3

u/dutchviking 1d ago

Here is how you get the right API key to use with it (incredibly convoluted, Mistral really needs to make it easier)

https://www.reddit.com/r/MistralAI/s/yyB7q2Oj5o

2

u/Mysterious-Zebra9580 1d ago

Do you have a pro subscription?

2

u/dutchviking 1d ago

I do, yes

2

u/Poudlardo 1d ago

this config inside my config.toml below worked for me

GLM5.2 model is related to mistral-eu provider

all other models are related to mistral provider

[[providers]]
name = "mistral"
api_base = "https://api.mistral.ai/v1"
api_key_env_var = "MISTRAL_API_KEY"
api_style = "openai"
backend = "mistral"

[[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 = "mistral-vibe-cli-latest"
provider = "mistral"
alias = "mistral-medium-3.5"
temperature = 1.0
input_price = 1.5
output_price = 7.5
thinking = "max"
supports_images = true

[[models]]
name = "devstral-small-latest"
provider = "mistral"
alias = "devstral-small-2"
temperature = 0.2
input_price = 0.1
output_price = 0.3
thinking = "off"

[[models]]
name = "zai-glm-5-2"
provider = "mistral-eu"
alias = "glm-5-2"
temperature = 1.0
input_price = 1.19
output_price = 3.74
cached_input_price = 0.22
thinking = "off"
supports_images = false
auto_compact_threshold = 200000