Add xhigh reasoningEffort to config schema (#965)
* test: cover xhigh reasoningEffort * feat: add xhigh reasoningEffort option * test: make reasoningEffort xhigh test model-agnostic
This commit is contained in:
parent
faf172a91d
commit
f1a279a10a
@ -1787,7 +1787,8 @@
|
|||||||
"enum": [
|
"enum": [
|
||||||
"low",
|
"low",
|
||||||
"medium",
|
"medium",
|
||||||
"high"
|
"high",
|
||||||
|
"xhigh"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"textVerbosity": {
|
"textVerbosity": {
|
||||||
|
|||||||
@ -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", () => {
|
test("rejects non-string variant", () => {
|
||||||
// #given
|
// #given
|
||||||
const config = { model: "openai/gpt-5.2", variant: 123 }
|
const config = { model: "openai/gpt-5.2", variant: 123 }
|
||||||
|
|||||||
@ -160,7 +160,7 @@ export const CategoryConfigSchema = z.object({
|
|||||||
type: z.enum(["enabled", "disabled"]),
|
type: z.enum(["enabled", "disabled"]),
|
||||||
budgetTokens: z.number().optional(),
|
budgetTokens: z.number().optional(),
|
||||||
}).optional(),
|
}).optional(),
|
||||||
reasoningEffort: z.enum(["low", "medium", "high"]).optional(),
|
reasoningEffort: z.enum(["low", "medium", "high", "xhigh"]).optional(),
|
||||||
textVerbosity: z.enum(["low", "medium", "high"]).optional(),
|
textVerbosity: z.enum(["low", "medium", "high"]).optional(),
|
||||||
tools: z.record(z.string(), z.boolean()).optional(),
|
tools: z.record(z.string(), z.boolean()).optional(),
|
||||||
prompt_append: z.string().optional(),
|
prompt_append: z.string().optional(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user