From eb597c5cd8c0801a7d0a1c88816a7eb55f7e47da Mon Sep 17 00:00:00 2001 From: vycdev2 Date: Fri, 11 Sep 2026 07:07:47 +0000 Subject: [PATCH] fix: support Codex ultra effort --- CHANGELOG.md | 1 + README.md | 5 +++-- src/codexConfig.ts | 1 + src/model.ts | 6 +++++- src/modelTypes.ts | 3 ++- tests/codexConfig.test.mjs | 7 +++++++ 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c48559d..7152245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ### Fixed +- Accept the `ultra` Codex reasoning effort when the selected model advertises support for it. - Recheck persisted Codex subscription authentication with a fresh client after a failed completion check; distinguish provider failure from unavailable verification and log only safe outcome categories. - Show every reported Codex allowance bucket, with the legacy usage response as a fallback, and accept Windows line endings in the nested security-test fixtures. - Run module-mocked security suites in the default test command and reject silently skipped nested test runs. diff --git a/README.md b/README.md index 923a862..a0c454e 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,9 @@ unset, or `inherit`. Codex never inherits `BOT_MODEL` or `CLAUDE_*` settings. Models must be explicit IDs. Claudify does not select a replacement model. If OpenAI reports rerouting during a turn, Claudify rejects the result without retrying or bypassing the reroute; usage or an action may already have occurred. -Effort accepts `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`, but -the selected account/model must advertise support for the chosen value. +Effort accepts `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, or +`ultra`, but the selected account/model must advertise support for the chosen +value. `default` omits the effort override. Model availability and effort support are checked before inference. API-key accounts are refused, even if API credentials exist elsewhere on the host. diff --git a/src/codexConfig.ts b/src/codexConfig.ts index bb240f8..95b96fd 100644 --- a/src/codexConfig.ts +++ b/src/codexConfig.ts @@ -19,6 +19,7 @@ const efforts = new Set([ "high", "xhigh", "max", + "ultra", ]); function model( value: string | undefined, diff --git a/src/model.ts b/src/model.ts index 88a4151..2a52f38 100644 --- a/src/model.ts +++ b/src/model.ts @@ -36,7 +36,11 @@ const codexRunner = createCodexRunner({ export const runModel: ModelRunner = (args, input, options, imagePaths) => { if (BOT_PROVIDER === "codex") return codexRunner(args, input, options, imagePaths); - if (options.effort === "none" || options.effort === "minimal") + if ( + options.effort === "none" + || options.effort === "minimal" + || options.effort === "ultra" + ) throw new Error("Unsupported Claude effort."); return runClaude(args, input, { ...options, diff --git a/src/modelTypes.ts b/src/modelTypes.ts index 39e41f3..e52b3da 100644 --- a/src/modelTypes.ts +++ b/src/modelTypes.ts @@ -7,7 +7,8 @@ export type ModelEffort = | "medium" | "high" | "xhigh" - | "max"; + | "max" + | "ultra"; export interface ModelRunOptions { workload: ClaudeWorkload; model?: string; diff --git a/tests/codexConfig.test.mjs b/tests/codexConfig.test.mjs index 783925c..afaa12e 100644 --- a/tests/codexConfig.test.mjs +++ b/tests/codexConfig.test.mjs @@ -25,6 +25,13 @@ test("Codex defaults to Luna and never inherits legacy Claude models", async () }); assert.equal(custom.workloads.response.model, "gpt-5.6-sol"); assert.equal(custom.workloads["profile-update"].effort, "low"); + const ultra = resolveCodexConfig({ + CODEX_MODEL: "gpt-5.6-sol", + CODEX_EFFORT: "ultra", + CODEX_SUMMARY_EFFORT: "ultra", + }); + assert.equal(ultra.workloads.response.effort, "ultra"); + assert.equal(ultra.workloads["daily-summary"].effort, "ultra"); const adaptive = resolveCodexConfig({ CODEX_EFFORT: "high", CODEX_RESPONSE_SIMPLE_EFFORT: "inherit",