Skip to content

Commit fcaa84f

Browse files
authored
fix(omp): accept thinkingLevel "max" when importing OMP sessions (#2191)
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
1 parent b4518cb commit fcaa84f

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

packages/server/src/server/agent/providers/omp/agent.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ describe("OMP agent client and session", () => {
6767
});
6868
});
6969

70+
test("preserves max as the selected thinking option", async () => {
71+
const omp = new OmpHarness();
72+
await omp.start({ thinkingOptionId: "max" });
73+
74+
expect(omp.launchConfiguration().argv).toEqual(expect.arrayContaining(["--thinking", "max"]));
75+
});
76+
7077
test("streams a prompt through completion", async () => {
7178
const omp = new OmpHarness();
7279
await omp.start();

packages/server/src/server/agent/providers/omp/agent.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ const OMP_THINKING_OPTIONS: ReadonlyArray<{
136136
{ id: "low", label: "Low", description: "Faster reasoning" },
137137
{ id: "medium", label: "Medium", description: "Balanced reasoning", isDefault: true },
138138
{ id: "high", label: "High", description: "Deeper reasoning" },
139-
{ id: "xhigh", label: "XHigh", description: "Maximum reasoning" },
139+
{ id: "xhigh", label: "XHigh", description: "Extra-high reasoning" },
140+
{ id: "max", label: "Max", description: "Maximum reasoning" },
140141
] as const;
141142

142143
export interface OmpAgentClientOptions {
@@ -269,7 +270,8 @@ function isOmpThinkingLevel(value: string | null | undefined): value is OmpThink
269270
value === "low" ||
270271
value === "medium" ||
271272
value === "high" ||
272-
value === "xhigh"
273+
value === "xhigh" ||
274+
value === "max"
273275
);
274276
}
275277

packages/server/src/server/agent/providers/omp/rpc-types.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
import { z } from "zod";
22

3-
export const OmpThinkingLevelSchema = z.enum(["off", "minimal", "low", "medium", "high", "xhigh"]);
3+
export const OmpThinkingLevelSchema = z.enum([
4+
"off",
5+
"minimal",
6+
"low",
7+
"medium",
8+
"high",
9+
"xhigh",
10+
"max",
11+
]);
412

513
export const OmpImageContentSchema = z
614
.object({ type: z.literal("image"), data: z.string(), mimeType: z.string() })

0 commit comments

Comments
 (0)