Skip to content

Expose Codex reasoning-effort in the media-job retry editor (inspect + clear-to-default) #2827

Description

@atomantic

Discovered while working #2826 (default Codex imagegen to gpt-5.6-luna / low effort, configurable in settings).

Problem / Goal

Codex renders now carry a per-render reasoning effort (defaulting to low, overridable via imageGen.codex.effort). A media job's params snapshot could preserve the effort a failed job used, but the Edit & Retry flow has no way to inspect or change it, and the server has no way to clear it back to the default. #2826 deliberately left retry to fall back to the shipped low default rather than ship a half-wired contract.

Context

  • server/services/imageGen/codex.js resolves effectiveEffort (validated against CODEX_EFFORT_LEVELS, default low) and passes -c model_reasoning_effort=<level>.
  • Queued Codex jobs thread effort: c.effort (dispatcher + routes/imageGen.js, universeBuilderRender.js, pipeline/visualStageHelpers.js, creativeDirector/firstPassGen.js, universeCharacterSheet.js, loraDatasetGenerate.js).
  • server/routes/mediaJobs.jsPARAM_ALLOWLIST (sanitizes job.params for display + forms the retry base) and RETRY_OVERRIDE_SCHEMA currently exclude effort (reverted in Default Codex imagegen to the cheap gpt-5.6-luna model at low effort, configurable in Image Gen settings #2826 to avoid an incomplete contract). emptyToUndef maps ''undefined, and the override merge drops undefined keys — so a naive effort: '' override cannot reset to the default.
  • client/src/components/media/MediaJobsQueue.jsxEditRetryForm renders the retry override fields; it never reads/displays/submits p.effort.

Proposed approach

  1. Re-add effort to PARAM_ALLOWLIST so the Render Queue row and retry base can surface the effort a job used.
  2. Add effort to RETRY_OVERRIDE_SCHEMA with a distinct clear-to-default representation (a sentinel like 'default'/null, or a separate clearEffort flag) so a caller can actually reset retry effort — not just leave emptyToUndef silently retaining the old value.
  3. Add a Codex-only Reasoning-effort <select> (options from CODEX_EFFORT_LEVELS, plus a "Default" choice) to EditRetryForm, shown only when the job is a Codex image job, wired into the override payload.
  4. Tests: retry preserves an explicit effort; an explicit clear returns retry to the default low; the control only renders for Codex jobs.

Acceptance criteria

  • A failed Codex job's effort is visible in the retry editor and preserved on a plain retry.
  • Choosing "Default" (or clearing) in the retry editor returns the retry to the shipped default effort — verified end to end.
  • The effort control renders only for Codex image jobs, not local/external/video jobs.
  • Server + client tests cover preserve / clear / non-Codex-hidden.

Out of scope

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions