[Enhancement]: Add native Mistral provider support
Target Component
External Integrations (LLM/Search APIs)
Enhancement Description
PentAGI has no native Mistral provider, so Mistral users must configure it through the generic custom provider
(LLM_SERVER_URL=https://api.mistral.ai/v1). That path does not work reliably with Mistral's hosted reasoning models, including the new hosted GLM 5.2/5.3 models.
PentAGI sends the modern reasoning: {effort: ...} object, which Mistral rejects as an unknown field (extra_forbidden: body.reasoning). The warning log shows only an empty body (API returned unexpected status code: 422: ), hiding the root cause.
Mistral-hosted models (zai-glm-latest, zai-glm-5-2, zai-glm-5-3, magistral) return the assistant message as an OpenAI-style content-block array instead of a plain string:
"content": [
{"type": "thinking", "thinking": [{"type": "text", "text": "..."}]},
{"type": "text", "text": "..."}
]This kills every agent chain with:
error decoding response: json: cannot unmarshal array into Go struct field ChatCompletionChoice.choices.message.content of type stringLLM_SERVER_PRESERVE_REASONING=true does not help: it only affects request-side history re-feeding, not response parsing.
zai-glm-latest (5.3) emits thinking blocks even at reasoning_effort: low (non-deterministically on complex prompts), and Mistral only accepts low/high/max, so that model is unusable through the custom provider. zai-glm-5-2 works only with no reasoning parameter at all, meaning no reasoning.
The goal: a first-class Mistral provider that lets PentAGI drive Mistral's hosted GLM 5.2/5.3 (and the rest of its reasoning catalog) with full reasoning support, from a single Mistral API key.
Technical Details
I can propose a PR if this sounds interesting.
Designs and Mockups
No response
Alternative Solutions
No response
Verification
- I have checked that this enhancement hasn't been already proposed
- This enhancement aligns with PentAGI's goal of autonomous penetration testing
- I have considered the security implications of this enhancement
- I have provided clear use cases and benefits
Source: vxcontrol/pentagi