Skip to content

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

acp: accept the thinking id and category Mistral's ACP agent uses for reasoning levels

Manuel1d948d58cb65
diff --git a/server/drivers/acp/config-options.test.ts b/server/drivers/acp/config-options.test.ts
index 2d5cefaac6..32f1c72692 100644
--- a/server/drivers/acp/config-options.test.ts
+++ b/server/drivers/acp/config-options.test.ts
@@ -31,6 +31,16 @@ describe("ACP model and reasoning options", () => {
] });
});
+ it("recognises the thinking category Vibe's ACP agent emits", () => {
+ expect(acpVariantOption({ configOptions: [{ type: "select", id: "thinking", category: "thinking", currentValue: "max", options: [
+ { value: "off", name: "Off" }, { value: "low", name: "Low" }, { value: "high", name: "High" },
+ { value: "xhigh", name: "Extra high" }, { value: "max", name: "Maximum" },
+ ] }] })).toEqual({ configId: "thinking", currentValue: "max", options: [
+ { id: "off", label: "Off" }, { id: "low", label: "Low" }, { id: "high", label: "High" },
+ { id: "xhigh", label: "Extra high" }, { id: "max", label: "Maximum" },
+ ] });
+ });
+
it("does not invent reasoning options for a model without them", () => {
expect(acpVariantOption({ configOptions: [{ type: "select", id: "model", options: [{ value: "fast" }] }] })).toBeUndefined();
expect(acpVariantOption({ configOptions: [{ type: "boolean", id: "effort", currentValue: true }] })).toBeUndefined();
diff --git a/server/drivers/acp/config-options.ts b/server/drivers/acp/config-options.ts
index 8e761ec482..a2adc5ed97 100644
--- a/server/drivers/acp/config-options.ts
+++ b/server/drivers/acp/config-options.ts
@@ -40,7 +40,8 @@ function selectValues(value: unknown): SelectValue[] {
export function acpVariantOption(result: unknown): { configId: string; options: ModelVariantOption[]; currentValue?: string } | undefined {
const option = configOptions(result).find((entry) => entry.type === "select" && nonempty(entry.id)
- && (entry.id === "effort" || entry.id === "reasoning_effort" || entry.id === "thought_level" || entry.category === "thought_level"));
+ && (entry.id === "effort" || entry.id === "reasoning_effort" || entry.id === "thought_level" || entry.id === "thinking"
+ || entry.category === "thought_level" || entry.category === "thinking"));
if (!option) return;
const currentValue = nonempty(option.currentValue);
return {