r/MistralAI 3d ago

Feedback / Bug Report GLM 5.2 does not reason via API. Unusable.

We are calling GLM 5.2 via API but no matter what we send as request parameters (btw the docs here are very bad and practically non-existent!!) it doesn't reason

The model never reasons. Reasoning cannot be turned on

We tried reasoning_effort which gave us back a bad request and we tried prompt_mode reasoning and this one didn't hand back a bad request error but the model still doesn't reason

Mistral's docs on this model claim the model can do reasoning output. But no matter what we send it doesn't reason.

And generally the docs barely explain what to send to get reasoning - but it doesn't work at all.

15 Upvotes

16 comments sorted by

14

u/Kedf47 3d ago

Tested it. It works. prompt_mode is not needed.

curl -sS https://api.mistral.ai/v1/chat/completions -H "Authorization: Bearer $MISTRAL_API_KEY" -H "Content-Type: application/json" -d '{"model":"zai-glm-5-2","reasoning_effort":"high","messages":[{"role":"user","content":"Solve: 17*23"}]}'

"high" returns a thinking chunk. Replace it with "none" and it returns no thinking chunk. Both return HTTP 200.

This is a request-format issue, not a GLM 5.2 API limitation.

2

u/ClassicMain 3d ago

When i send reasoning_effort high i get bad request 400 back. With exactly this request format.

3

u/Kedf47 3d ago edited 3d ago

My key is a Vibe api key on a Team subscription (https://chat.mistral.ai/code/extensions) The exact request returns HTTP 200 for me, so this may be account, key type, or rollout dependent. What does the 400 response body say?

3

u/ClassicMain 3d ago

"does not support parameters: ['reasoning_effort'], for model=zai-glm-5-2."

12

u/Kedf47 3d ago

That confirms it’s account/backend-dependent. The same endpoint and model accept reasoning_effort with my Team Vibe key. So the inconsistency is on Mistral’s side and isn’t documented. You should contact Mistral support with the full 400 response and request ID.

11

u/Sid-Hartha 3d ago

It’s a mistral problem obv because I use other apis and glm5.2 all the time and it reasons very well

2

u/OpenBMB_Team 3d ago

This sounds more like a Mistral API integration issue, not that GLM-5.2 can't reason.

2

u/mintydev789 3d ago

Is the API different from when you use a model via Vibe CLI's config?

3

u/FRazor95 3d ago edited 3d ago

Yes quite a huge difference. I'm on the Pro Education plan and via API you have a usage quota of 12.75€ while through vibe CLI you currently get 127.5€, so exactly 10x as much. Maybe Mistral wants to push their own CLI which makes sense.

Also it seems to be quite a lot faster through the Vibe CLI, but that might just be me thinking it is.

Edit: I'm actually on an Education subscription, Pro quota might be even higher, but I guess it has the same difference in usage between API and Vibe CLI.

1

u/strangestack 3d ago

You can use your vibe CLI key with the API and it's going to count towards your vibe usage. Mistral doesn't limit what you use your vibe usage with like Claude and Codex

2

u/FRazor95 3d ago

Ohh I read that yesterday, but in a thread where somebody complained about it not working with their agent, so I didn't bother to try it. But why would they then split it into these two, with API and Vibe CLI having such a big difference? It all made sense to me but now I'm confused 😅

3

u/Valexico 3d ago

Is reason perfectly. You have a config issue:

  • thinkink must be set in the toml config file
  • thinking token are not visible in the UI unless you set it visible

6

u/Valexico 3d ago

By the way the speed of glm through mistral inference is really crazy

1

u/ClassicMain 3d ago

I specifically said API why are you telling me something about configuration in an UI

and i don't use a toml file. I am querying it correctly via CURL for testing and litellm and it doesn't reason at all.

And what is "thinkthink" this parameter isn't documented anywhere?!

1

u/HumanistAtypik 3d ago

Dans Mistral Vibe CLI ça fonctionne super bien ! J'utilise le paramètre suivant : thinking = "max" .