Skip to content

Commit d92ba4f

Browse files
feat: Provider/Mistral full support for Mistral on OpenClaw 🇫🇷 (#23845)
* Onboard: add Mistral auth choice and CLI flags * Onboard/Auth: add Mistral provider config defaults * Auth choice: wire Mistral API-key flow * Onboard non-interactive: support --mistral-api-key * Media understanding: add Mistral Voxtral audio provider * Changelog: note Mistral onboarding and media support * Docs: add Mistral provider and onboarding/media references * Tests: cover Mistral media registry/defaults and auth mapping * Memory: add Mistral embeddings provider support * Onboarding: refresh Mistral model metadata * Docs: document Mistral embeddings and endpoints * Memory: persist Mistral embedding client state in managers * Memory: add regressions for mistral provider wiring * Gateway: add live tool probe retry helper * Gateway: cover live tool probe retry helper * Gateway: retry malformed live tool-read probe responses * Memory: support plain-text batch error bodies * Tests: add Mistral Voxtral live transcription smoke * Docs: add Mistral live audio test command * Revert: remove Mistral live voice test and docs entry * Onboard: re-export Mistral default model ref from models * Changelog: credit joeVenner for Mistral work * fix: include Mistral in auto audio key fallback * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Shakker <[email protected]>
1 parent a66b98a commit d92ba4f

55 files changed

Lines changed: 996 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Docs: https://docs.openclaw.ai
88

99
### Changes
1010

11+
- Provider/Mistral: Adding support for new provider Mistral, supporting also memory embeddings and voice. (#23845) Thanks @vincentkoc
1112
- Update/Core: add an optional built-in auto-updater for package installs (`update.auto.*`), default-off, with stable rollout delay+jitter and beta hourly cadence.
1213
- CLI/Update: add `openclaw update --dry-run` to preview channel/tag/target/restart actions without mutating config, installing, syncing plugins, or restarting.
1314
- Config/UI: add tag-aware settings filtering and broaden config labels/help copy so fields are easier to discover and understand in the dashboard config screen.
@@ -20,6 +21,7 @@ Docs: https://docs.openclaw.ai
2021
- Channels/Config: unify channel preview streaming config handling with a shared resolver and canonical migration path.
2122
- Gateway/Auth: unify call/probe/status/auth credential-source precedence on shared resolver helpers, with table-driven parity coverage across gateway entrypoints.
2223
- Gateway/Auth: refactor gateway credential resolution and websocket auth handshake paths to use shared typed auth contexts, including explicit `auth.deviceToken` support in connect frames and tests.
24+
- Onboarding/Media: add first-class Mistral API-key onboarding (`--mistral-api-key`, auth-choice flow + config defaults) and Mistral Voxtral audio transcription provider defaults for media understanding. Thanks @jaimegh-es, @joeVenner, and @JamesEBall.
2325
- Skills: remove bundled `food-order` skill from this repo; manage/install it from ClawHub instead.
2426
- Docs/Subagents: make thread-bound session guidance channel-first instead of Discord-specific, and list thread-supporting channels explicitly. (#23589) Thanks @osolmaz.
2527

@@ -99,6 +101,9 @@ Docs: https://docs.openclaw.ai
99101
- Control UI/WebSocket: stop and clear the browser gateway client on UI teardown so remounts cannot leave orphan websocket clients that create duplicate active connections. (#23422) Thanks @floatinggball-design.
100102
- Control UI/WebSocket: send a stable per-tab `instanceId` in websocket connect frames so reconnect cycles keep a consistent client identity for diagnostics and presence tracking. (#23616) Thanks @zq58855371-ui.
101103
- Config/Memory: allow `"mistral"` in `agents.defaults.memorySearch.provider` and `agents.defaults.memorySearch.fallback` schema validation. (#14934) Thanks @ThomsenDrake.
104+
- Memory/Mistral: align schema/runtime support by adding Mistral embeddings (`/v1/embeddings`, default `mistral-embed`) for memory search provider resolution/fallback/doctor checks, and refresh onboarding Mistral model metadata for `mistral-large-latest` context/output limits. Thanks @jaimegh-es, @joeVenner, and @JamesEBall.
105+
- Security/Feishu: enforce ID-only allowlist matching for DM/group sender authorization, normalize Feishu ID prefixes during checks, and ignore mutable display names so display-name collisions cannot satisfy allowlist entries. This ships in the next npm release. Thanks @jiseoung for reporting.
106+
- Security/Group policy: harden `channels.*.groups.*.toolsBySender` matching by requiring explicit sender-key types (`id:`, `e164:`, `username:`, `name:`), preventing cross-identifier collisions across mutable/display-name fields while keeping legacy untyped keys on a deprecated ID-only path. This ships in the next npm release. Thanks @jiseoung for reporting.
102107
- Feishu/Commands: in group chats, command authorization now falls back to top-level `channels.feishu.allowFrom` when per-group `allowFrom` is not set, so `/command` no longer gets blocked by an unintended empty allowlist. (#23756)
103108
- Dev tooling: prevent `CLAUDE.md` symlink target regressions by excluding CLAUDE symlink sentinels from `oxfmt` and marking them `-text` in `.gitattributes`, so formatter/EOL normalization cannot reintroduce trailing-newline targets. Thanks @vincentkoc.
104109
- Agents/Compaction: restore embedded compaction safeguard/context-pruning extension loading in production by wiring bundled extension factories into the resource loader instead of runtime file-path resolution. (#22349) Thanks @Glucksberg.

‎docs/cli/index.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,14 @@ Options:
321321
- `--non-interactive`
322322
- `--mode <local|remote>`
323323
- `--flow <quickstart|advanced|manual>` (manual is an alias for advanced)
324-
- `--auth-choice <setup-token|token|chutes|openai-codex|openai-api-key|openrouter-api-key|ai-gateway-api-key|moonshot-api-key|moonshot-api-key-cn|kimi-code-api-key|synthetic-api-key|venice-api-key|gemini-api-key|zai-api-key|apiKey|minimax-api|minimax-api-lightning|opencode-zen|custom-api-key|skip>`
324+
- `--auth-choice <setup-token|token|chutes|openai-codex|openai-api-key|openrouter-api-key|ai-gateway-api-key|moonshot-api-key|moonshot-api-key-cn|kimi-code-api-key|synthetic-api-key|venice-api-key|gemini-api-key|zai-api-key|mistral-api-key|apiKey|minimax-api|minimax-api-lightning|opencode-zen|custom-api-key|skip>`
325325
- `--token-provider <id>` (non-interactive; used with `--auth-choice token`)
326326
- `--token <token>` (non-interactive; used with `--auth-choice token`)
327327
- `--token-profile-id <id>` (non-interactive; default: `<provider>:manual`)
328328
- `--token-expires-in <duration>` (non-interactive; e.g. `365d`, `12h`)
329329
- `--anthropic-api-key <key>`
330330
- `--openai-api-key <key>`
331+
- `--mistral-api-key <key>`
331332
- `--openrouter-api-key <key>`
332333
- `--ai-gateway-api-key <key>`
333334
- `--moonshot-api-key <key>`

‎docs/cli/onboard.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ openclaw onboard --non-interactive \
5656
# --auth-choice zai-cn
5757
```
5858

59+
Non-interactive Mistral example:
60+
61+
```bash
62+
openclaw onboard --non-interactive \
63+
--auth-choice mistral-api-key \
64+
--mistral-api-key "$MISTRAL_API_KEY"
65+
```
66+
5967
Flow notes:
6068

6169
- `quickstart`: minimal prompts, auto-generates a gateway token.

‎docs/concepts/memory.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ Defaults:
105105
2. `openai` if an OpenAI key can be resolved.
106106
3. `gemini` if a Gemini key can be resolved.
107107
4. `voyage` if a Voyage key can be resolved.
108-
5. Otherwise memory search stays disabled until configured.
108+
5. `mistral` if a Mistral key can be resolved.
109+
6. Otherwise memory search stays disabled until configured.
109110
- Local mode uses node-llama-cpp and may require `pnpm approve-builds`.
110111
- Uses sqlite-vec (when available) to accelerate vector search inside SQLite.
111112

@@ -114,7 +115,9 @@ resolves keys from auth profiles, `models.providers.*.apiKey`, or environment
114115
variables. Codex OAuth only covers chat/completions and does **not** satisfy
115116
embeddings for memory search. For Gemini, use `GEMINI_API_KEY` or
116117
`models.providers.google.apiKey`. For Voyage, use `VOYAGE_API_KEY` or
117-
`models.providers.voyage.apiKey`. When using a custom OpenAI-compatible endpoint,
118+
`models.providers.voyage.apiKey`. For Mistral, use `MISTRAL_API_KEY` or
119+
`models.providers.mistral.apiKey`.
120+
When using a custom OpenAI-compatible endpoint,
118121
set `memorySearch.remote.apiKey` (and optional `memorySearch.remote.headers`).
119122

120123
### QMD backend (experimental)
@@ -328,7 +331,7 @@ If you don't want to set an API key, use `memorySearch.provider = "local"` or se
328331
329332
Fallbacks:
330333
331-
- `memorySearch.fallback` can be `openai`, `gemini`, `local`, or `none`.
334+
- `memorySearch.fallback` can be `openai`, `gemini`, `voyage`, `mistral`, `local`, or `none`.
332335
- The fallback provider is only used when the primary embedding provider fails.
333336
334337
Batch indexing (OpenAI + Gemini + Voyage):

‎docs/concepts/model-providers.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,13 @@ OpenClaw ships with the pi‑ai catalog. These providers require **no**
131131
- OpenRouter: `openrouter` (`OPENROUTER_API_KEY`)
132132
- Example model: `openrouter/anthropic/claude-sonnet-4-5`
133133
- xAI: `xai` (`XAI_API_KEY`)
134+
- Mistral: `mistral` (`MISTRAL_API_KEY`)
135+
- Example model: `mistral/mistral-large-latest`
136+
- CLI: `openclaw onboard --auth-choice mistral-api-key`
134137
- Groq: `groq` (`GROQ_API_KEY`)
135138
- Cerebras: `cerebras` (`CEREBRAS_API_KEY`)
136139
- GLM models on Cerebras use ids `zai-glm-4.7` and `zai-glm-4.6`.
137140
- OpenAI-compatible base URL: `https://api.cerebras.ai/v1`.
138-
- Mistral: `mistral` (`MISTRAL_API_KEY`)
139141
- GitHub Copilot: `github-copilot` (`COPILOT_GITHUB_TOKEN` / `GH_TOKEN` / `GITHUB_TOKEN`)
140142
- Hugging Face Inference: `huggingface` (`HUGGINGFACE_HUB_TOKEN` or `HF_TOKEN`) — OpenAI-compatible router; example model: `huggingface/deepseek-ai/DeepSeek-R1`; CLI: `openclaw onboard --auth-choice huggingface-api-key`. See [Hugging Face (Inference)](/providers/huggingface).
141143

‎docs/docs.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@
9191
"source": "/moonshot",
9292
"destination": "/providers/moonshot"
9393
},
94+
{
95+
"source": "/mistral",
96+
"destination": "/providers/mistral"
97+
},
9498
{
9599
"source": "/openrouter",
96100
"destination": "/providers/openrouter"
@@ -1066,6 +1070,7 @@
10661070
"providers/bedrock",
10671071
"providers/vercel-ai-gateway",
10681072
"providers/moonshot",
1073+
"providers/mistral",
10691074
"providers/minimax",
10701075
"providers/opencode",
10711076
"providers/glm",

‎docs/help/faq.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,14 +1251,15 @@ still need a real API key (`OPENAI_API_KEY` or `models.providers.openai.apiKey`)
12511251
If you don't set a provider explicitly, OpenClaw auto-selects a provider when it
12521252
can resolve an API key (auth profiles, `models.providers.*.apiKey`, or env vars).
12531253
It prefers OpenAI if an OpenAI key resolves, otherwise Gemini if a Gemini key
1254-
resolves. If neither key is available, memory search stays disabled until you
1255-
configure it. If you have a local model path configured and present, OpenClaw
1254+
resolves, then Voyage, then Mistral. If no remote key is available, memory
1255+
search stays disabled until you configure it. If you have a local model path
1256+
configured and present, OpenClaw
12561257
prefers `local`.
12571258

12581259
If you'd rather stay local, set `memorySearch.provider = "local"` (and optionally
12591260
`memorySearch.fallback = "none"`). If you want Gemini embeddings, set
12601261
`memorySearch.provider = "gemini"` and provide `GEMINI_API_KEY` (or
1261-
`memorySearch.remote.apiKey`). We support **OpenAI, Gemini, or local** embedding
1262+
`memorySearch.remote.apiKey`). We support **OpenAI, Gemini, Voyage, Mistral, or local** embedding
12621263
models - see [Memory](/concepts/memory) for the setup details.
12631264

12641265
### Does memory persist forever What are the limits

‎docs/nodes/audio.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,27 @@ Note: Binary detection is best-effort across macOS/Linux/Windows; ensure the CLI
9494
}
9595
```
9696

97+
### Provider-only (Mistral Voxtral)
98+
99+
```json5
100+
{
101+
tools: {
102+
media: {
103+
audio: {
104+
enabled: true,
105+
models: [{ provider: "mistral", model: "voxtral-mini-latest" }],
106+
},
107+
},
108+
},
109+
}
110+
```
111+
97112
## Notes & limits
98113

99114
- Provider auth follows the standard model auth order (auth profiles, env vars, `models.providers.*.apiKey`).
100115
- Deepgram picks up `DEEPGRAM_API_KEY` when `provider: "deepgram"` is used.
101116
- Deepgram setup details: [Deepgram (audio transcription)](/providers/deepgram).
117+
- Mistral setup details: [Mistral](/providers/mistral).
102118
- Audio providers can override `baseUrl`, `headers`, and `providerOptions` via `tools.media.audio`.
103119
- Default size cap is 20MB (`tools.media.audio.maxBytes`). Oversize audio is skipped for that model and the next entry is tried.
104120
- Default `maxChars` for audio is **unset** (full transcript). Set `tools.media.audio.maxChars` or per-entry `maxChars` to trim output.

‎docs/nodes/media-understanding.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ If you omit `capabilities`, the entry is eligible for the list it appears in.
175175

176176
## Provider support matrix (OpenClaw integrations)
177177

178-
| Capability | Provider integration | Notes |
179-
| ---------- | ------------------------------------------------ | ------------------------------------------------- |
180-
| Image | OpenAI / Anthropic / Google / others via `pi-ai` | Any image-capable model in the registry works. |
181-
| Audio | OpenAI, Groq, Deepgram, Google | Provider transcription (Whisper/Deepgram/Gemini). |
182-
| Video | Google (Gemini API) | Provider video understanding. |
178+
| Capability | Provider integration | Notes |
179+
| ---------- | ------------------------------------------------ | --------------------------------------------------------- |
180+
| Image | OpenAI / Anthropic / Google / others via `pi-ai` | Any image-capable model in the registry works. |
181+
| Audio | OpenAI, Groq, Deepgram, Google, Mistral | Provider transcription (Whisper/Deepgram/Gemini/Voxtral). |
182+
| Video | Google (Gemini API) | Provider video understanding. |
183183

184184
## Recommended providers
185185

@@ -190,7 +190,7 @@ If you omit `capabilities`, the entry is eligible for the list it appears in.
190190

191191
**Audio**
192192

193-
- `openai/gpt-4o-mini-transcribe`, `groq/whisper-large-v3-turbo`, or `deepgram/nova-3`.
193+
- `openai/gpt-4o-mini-transcribe`, `groq/whisper-large-v3-turbo`, `deepgram/nova-3`, or `mistral/voxtral-mini-latest`.
194194
- CLI fallback: `whisper-cli` (whisper-cpp) or `whisper`.
195195
- Deepgram setup: [Deepgram (audio transcription)](/providers/deepgram).
196196

‎docs/providers/index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ See [Venice AI](/providers/venice).
4444
- [Together AI](/providers/together)
4545
- [Cloudflare AI Gateway](/providers/cloudflare-ai-gateway)
4646
- [Moonshot AI (Kimi + Kimi Coding)](/providers/moonshot)
47+
- [Mistral](/providers/mistral)
4748
- [OpenCode Zen](/providers/opencode)
4849
- [Amazon Bedrock](/providers/bedrock)
4950
- [Z.AI](/providers/zai)

0 commit comments

Comments
 (0)