From f1a279a10ab8a1fc564322244d9ba7c00f3342c8 Mon Sep 17 00:00:00 2001 From: Sungho Park Date: Sat, 24 Jan 2026 15:48:15 +0900 Subject: [PATCH] Add xhigh reasoningEffort to config schema (#965) * test: cover xhigh reasoningEffort * feat: add xhigh reasoningEffort option * test: make reasoningEffort xhigh test model-agnostic --- assets/oh-my-opencode.schema.json | 3 ++- src/config/schema.test.ts | 14 ++++++++++++++ src/config/schema.ts | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/assets/oh-my-opencode.schema.json b/assets/oh-my-opencode.schema.json index 334b3be1..7ecbd40c 100644 --- a/assets/oh-my-opencode.schema.json +++ b/assets/oh-my-opencode.schema.json @@ -1787,7 +1787,8 @@ "enum": [ "low", "medium", - "high" + "high", + "xhigh" ] }, "textVerbosity": { diff --git a/src/config/schema.test.ts b/src/config/schema.test.ts index 018fbb7b..43e1d4e5 100644 --- a/src/config/schema.test.ts +++ b/src/config/schema.test.ts @@ -345,6 +345,20 @@ describe("CategoryConfigSchema", () => { } }) + test("accepts reasoningEffort as optional string with xhigh", () => { + // #given + const config = { reasoningEffort: "xhigh" } + + // #when + const result = CategoryConfigSchema.safeParse(config) + + // #then + expect(result.success).toBe(true) + if (result.success) { + expect(result.data.reasoningEffort).toBe("xhigh") + } + }) + test("rejects non-string variant", () => { // #given const config = { model: "openai/gpt-5.2", variant: 123 } diff --git a/src/config/schema.ts b/src/config/schema.ts index 4454add7..48bdb916 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -160,7 +160,7 @@ export const CategoryConfigSchema = z.object({ type: z.enum(["enabled", "disabled"]), budgetTokens: z.number().optional(), }).optional(), - reasoningEffort: z.enum(["low", "medium", "high"]).optional(), + reasoningEffort: z.enum(["low", "medium", "high", "xhigh"]).optional(), textVerbosity: z.enum(["low", "medium", "high"]).optional(), tools: z.record(z.string(), z.boolean()).optional(), prompt_append: z.string().optional(),