Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Expose Mistral Vibe's thinking levels as model variants

Nguyen Viet872c5e3ab449
diff --git a/server/drivers/acp/mistral-vibe.test.ts b/server/drivers/acp/mistral-vibe.test.ts
index e90123bed6..34a5cb2ef4 100644
--- a/server/drivers/acp/mistral-vibe.test.ts
+++ b/server/drivers/acp/mistral-vibe.test.ts
@@ -138,6 +138,50 @@ describe("Mistral (Vibe) ACP driver", () => {
expect(JSON.parse(promptRows.at(-1)!)).toMatchObject({ model: "zai-glm-5-3-flash" });
});
+ it("surfaces Vibe's thinking levels as model variants and applies the chosen one", async () => {
+ const { instance, recorder } = await create({
+ MISTRAL_API_KEY: "engine-fixture-key",
+ FAKE_ACP_VARIANTS: JSON.stringify({
+ "mistral-medium-3.5": {
+ id: "thinking",
+ currentValue: "max",
+ options: [
+ { value: "off", name: "Off" },
+ { value: "low", name: "Low" },
+ { value: "high", name: "High" },
+ { value: "xhigh", name: "Xhigh" },
+ { value: "max", name: "Max" },
+ ],
+ },
+ }),
+ });
+ expect(instance.adapter.capabilities.modelVariants).toBe(true);
+ const { turnId } = await instance.adapter.sendTurn({
+ threadId: "mistral-vibe-effort", text: "hello", model: "mistral-medium-3.5",
+ variant: "low", approvalMode: "ask",
+ });
+ await recorder.until((event) => event.type === "turn.completed" && event.turnId === turnId);
+
+ expect(recorder.events).toContainEqual(expect.objectContaining({
+ type: "session.model-variants",
+ model: "mistral-medium-3.5",
+ variants: {
+ options: [
+ { id: "off", label: "Off" },
+ { id: "low", label: "Low" },
+ { id: "high", label: "High" },
+ { id: "xhigh", label: "Xhigh" },
+ { id: "max", label: "Max" },
+ ],
+ currentValue: "max",
+ },
+ }));
+ expect(JSON.parse(readFileSync(join(scratch, "launch.json.config.json"), "utf8"))).toContainEqual({
+ method: "session/set_config_option",
+ params: { sessionId: "fake-acp-session", configId: "thinking", value: "low" },
+ });
+ });
+
// A close that fails re-loads in a fresh process instead: one more launch per new bearer.
it.each([["1", 1], ["error", 3]])("closes the live session before re-loading it with a new MCP bearer, so vibe-acp streams each reply once (close: %s)", async (close, processes) => {
const launches = join(scratch, "launches");
diff --git a/server/drivers/acp/mistral-vibe.ts b/server/drivers/acp/mistral-vibe.ts
index 72885368a2..777a764229 100644
--- a/server/drivers/acp/mistral-vibe.ts
+++ b/server/drivers/acp/mistral-vibe.ts
@@ -1,5 +1,5 @@
// Mistral Vibe over ACP (`vibe-acp`, github.com/mistralai/mistral-vibe). Verified against
-// vibe-acp 3.1.1 on 2026-11-13:
+// vibe-acp 3.1.1 on 2026-11-13; re-checked against 3.1.2 on 2026-11-30:
//
// - initialize answers protocolVersion 1, loadSession true, promptCapabilities.image true,
// sessionCapabilities {list, fork, close} and exactly one auth method:
@@ -12,9 +12,10 @@
// - A browser sign-in leaves a populated `$VIBE_HOME/whoami_cache.json`; `MISTRAL_API_KEY`
// (Settings → Connections → Model providers, plan key) works with no sign-in.
// - session/new exposes three config options: `mode` (MausBot's approval modes map there),
-// `model`, and `thinking` (off | high). `thinking` follows the chosen model's own default;
-// item-specific thought levels prove nothing here, so variants stay off.
-// - `vibe-acp --version` prints "vibe-acp 3.1.1".
+// `model`, and `thinking`. 3.1.2 offers off | low | high | xhigh | max, starting on the chosen
+// model's own current level, so it rides the session as a model variant (`modelVariants`);
+// discovery leaves variants off rather than switching through every model to read them.
+// - `vibe-acp --version` prints "vibe-acp 3.1.2".
import { execFile, execFileSync } from "node:child_process";
import { existsSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { homedir } from "node:os";
@@ -183,6 +184,8 @@ export const mistralVibeSupport: AcpSupport = {
},
// Model is a session config option (see header); ids pass through unchanged.
selectModel: { configId: "model" },
+ // vibe-acp 3.1.2's `thinking` select is its reasoning effort for the chosen model.
+ modelVariants: true,
shareProcess: true,
closeBeforeLiveLoad: true,
resolveModels: resolveMistralVibeModels,