The best way to control Claude Code, Codex and more from any computer or phone
fix(acp-registry): each Mistral Vibe model shows its own thinking levels (#38556)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
amtiyo committed
Nov 18, 2026 at 12:41 UTC
018ca6d58ec968479e287c2769bb9b2b8c44c29f
3 files changed
+93
-4
packages/provider-acp-registry/src/server/driver.test.ts
+80
@@ -416,6 +416,86 @@ describe("acpRegistrySnapshotReadiness", () => {
416
]);
417
});
418
419
+ it("keeps each Mistral Vibe model's own thinking levels", () => {
420
+ const provider = buildCheckedAcpRegistrySnapshot({
421
+ ...identity,
422
+ settings: decodeSettings({ agentId: "mistral-vibe" }),
423
+ checkedAt: "2026-11-18T10:00:00.000Z",
424
+ inspection: {
425
+ status: "ready",
426
+ agentId: "mistral-vibe",
427
+ version: "3.1.1",
428
+ distribution: "binary",
429
+ },
430
+ probe: {
431
+ probe: {
432
+ instanceId: identity.instanceId,
433
+ ready: true,
434
+ icon: null,
435
+ authMethods: [],
436
+ models: [],
437
+ currentModelId: null,
438
+ configOptions: [],
439
+ sessionManagement: noSessionManagement,
440
+ },
441
+ slashCommands: [],
442
+ skills: [],
443
+ },
444
+ });
445
+ // Mistral Vibe 3.1.1 sends its levels under category "thinking", for the session's model only.
446
+ const vibeSession = (model: string, levels: ReadonlyArray<string>) =>
447
+ normalizeAcpRegistryLiveConfiguration([
448
+ {
449
+ id: "model",
450
+ name: "Model",
451
+ category: "model",
452
+ type: "select",
453
+ currentValue: model,
454
+ options: ["mistral-large-4-0-3", "mistral-medium-3.5"].map((value) => ({
455
+ value,
456
+ name: value,
457
+ })),
458
+ },
459
+ {
460
+ id: "thinking",
461
+ name: "Thinking",
462
+ category: "thinking",
463
+ type: "select",
464
+ currentValue: "high",
465
+ options: levels.map((value) => ({ value, name: value })),
466
+ },
467
+ ]);
468
+ const thinking = (levels: ReadonlyArray<string>) => ({
469
+ id: "thinking",
470
+ label: "Thinking",
471
+ type: "select",
472
+ options: levels.map((id) => ({ id, label: id })),
473
+ currentValue: "high",
474
+ role: "reasoning",
475
+ });
476
+ const descriptors = (snapshot: typeof provider) =>
477
+ snapshot.models.map((model) => [model.slug, model.capabilities?.optionDescriptors ?? []]);
478
+
479
+ const onLarge = applyAcpRegistryLiveConfiguration(
480
+ provider,
481
+ vibeSession("mistral-large-4-0-3", ["low", "medium", "high"]),
482
+ [],
483
+ );
484
+ expect(descriptors(onLarge)).toEqual([
485
+ ["mistral-large-4-0-3", [thinking(["low", "medium", "high"])]],
486
+ ["mistral-medium-3.5", []],
487
+ ]);
488
+ const onMedium = applyAcpRegistryLiveConfiguration(
489
+ onLarge,
490
+ vibeSession("mistral-medium-3.5", ["off", "high"]),
491
+ [],
492
+ );
493
+ expect(descriptors(onMedium)).toEqual([
494
+ ["mistral-large-4-0-3", [thinking(["low", "medium", "high"])]],
495
+ ["mistral-medium-3.5", [thinking(["off", "high"])]],
496
+ ]);
497
+ });
498
+
499
it("projects discovery without claiming authentication when no login methods are advertised", () => {
500
const snapshot = buildCheckedAcpRegistrySnapshot({
501
...identity,
packages/provider-acp-registry/src/server/probe.ts
+5
-2
@@ -33,6 +33,7 @@ import {
33
import {
34
acpProviderOptionDescriptors,
35
flattenSelectChoices,
36
+ isAcpThoughtLevelOption,
37
} from "@t3tools/provider-acp/server/sessionConfig";
38
import * as AcpRegistryRuntimeCoordinator from "./AcpRegistryRuntimeCoordinator.ts";
39
import * as AcpSessionRuntime from "@t3tools/provider-acp/server/AcpSessionRuntime";
@@ -234,7 +235,9 @@ export function normalizeAcpRegistryLiveConfiguration(
235
currentModelId === undefined
236
? null
237
: (boundedOpaqueValue(currentModelId, MAX_ID_LENGTH) ?? null);
237
- const effortOption = configOptions.find((option) => option.category === "thought_level");
238
+ const effortOption =
239
+ configOptions.find((option) => option.category === "thought_level") ??
240
+ configOptions.find(isAcpThoughtLevelOption);
241
const models = normalizeModels(candidates, boundedCurrentModelId).map((model) => {
242
const reasoningEffort = advertisedReasoningEffort(
243
effortOption,
@@ -245,7 +248,7 @@ export function normalizeAcpRegistryLiveConfiguration(
248
const descriptors = acpProviderOptionDescriptors({ configOptions, modeState });
249
const modelOptionIds = new Set(
250
configOptions
248
- .filter((option) => option.category === "thought_level" || option.category === "model_config")
251
+ .filter((option) => isAcpThoughtLevelOption(option) || option.category === "model_config")
252
.map((option) => option.id),
253
);
254
return {
packages/provider-acp/src/server/sessionConfig.ts
+8
-2
@@ -22,6 +22,11 @@ const boundedOpaqueValue = (value: string, maximumLength: number): string | unde
22
const choiceId = (value: string): string | undefined =>
23
value === "" ? ACP_EMPTY_OPTION_VALUE : boundedOpaqueValue(value, MAX_TEXT_LENGTH);
24
25
+/** Mistral Vibe 3.1 sends its reasoning level under `thinking`, a category ACP reserves but never defined. */
26
+export const isAcpThoughtLevelOption = (option: EffectAcpSchema.SessionConfigOption): boolean =>
27
+ option.category === "thought_level" ||
28
+ (option.category === "thinking" && option.type === "select");
29
+
30
export function flattenSelectChoices(
31
options: EffectAcpSchema.SessionConfigSelectOptions,
32
): ReadonlyArray<EffectAcpSchema.SessionConfigSelectOption> {
@@ -91,7 +96,8 @@ export function acpProviderOptionDescriptors(input: {
96
continue;
97
}
98
if (option.category === "mode") hasModeCategory = true;
94
- if (option.category === "thought_level") {
99
+ const isThoughtLevel = isAcpThoughtLevelOption(option);
100
+ if (isThoughtLevel) {
101
mirroredModeChoiceSets.push(new Set(choices.map((choice) => choice.id)));
102
}
103
const currentValue = choiceId(option.currentValue);
@@ -102,7 +108,7 @@ export function acpProviderOptionDescriptors(input: {
108
...(currentValue && choices.some((choice) => choice.id === currentValue)
109
? { currentValue }
110
: {}),
105
- ...(option.category === "thought_level" ? { role: "reasoning" as const } : {}),
111
+ ...(isThoughtLevel ? { role: "reasoning" as const } : {}),
112
});
113
if (descriptors.length === MAX_OPTION_DESCRIPTORS) return descriptors;
114
}