Thinking: accept extra-high alias and sync Codex FAQ wording

This commit is contained in:
slonce70
2026-02-06 01:25:28 +02:00
committed by Darshil
parent bc88e58fcf
commit 5958e5693c
4 changed files with 14 additions and 7 deletions

View File

@@ -40,7 +40,11 @@ export function normalizeThinkLevel(raw?: string | null): ThinkLevel | undefined
if (!raw) {
return undefined;
}
const key = raw.toLowerCase();
const key = raw.trim().toLowerCase();
const collapsed = key.replace(/[\s_-]+/g, "");
if (collapsed === "xhigh" || collapsed === "extrahigh") {
return "xhigh";
}
if (["off"].includes(key)) {
return "off";
}
@@ -61,9 +65,6 @@ export function normalizeThinkLevel(raw?: string | null): ThinkLevel | undefined
) {
return "high";
}
if (["xhigh", "x-high", "x_high"].includes(key)) {
return "xhigh";
}
if (["think"].includes(key)) {
return "minimal";
}