Skip to content

Codex: fail fast on pinned unavailable alpha model and surface offending model in summaries - #42040

Closed
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/aw-failures-fix-codex-snapshot
Closed

Codex: fail fast on pinned unavailable alpha model and surface offending model in summaries#42040
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/aw-failures-fix-codex-snapshot

Conversation

Copilot AI commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Scheduled Codex workflows were failing 100% red because sub-agent sampling still pinned gpt-5-codex-alpha-2025-11-07, which 404s at the API proxy. The harness already classified this as non-retryable, but only after wasted in-CLI retries and without clear model attribution in summary output.

  • Harness preflight guard for known-bad model pins

    • Added a known-unavailable model blocklist in codex_harness.cjs.
    • Preflight scans resolved Codex args/prompt payload (including sub-agent model instructions) and exits before spawning Codex when the blocked snapshot is present.
    • Step summary now includes explicit remediation guidance (move to a GA Codex model such as gpt-5.4-mini).
  • Clearer invalid-model attribution

    • Added model-name extraction from common invalid-model payloads (AIC Model not found ... and generic model ... not found/is not available forms).
    • When invalid-model is detected, the harness writes the offending model to GITHUB_STEP_SUMMARY and includes it in stderr diagnostics.
  • Repo-wide regression protection

    • Added a workflow-source guard test to fail if any .github/workflows/*.md reintroduces gpt-5-codex-alpha-2025-11-07.
    • Added harness unit coverage for blocked-model detection, offending-model extraction, and preflight short-circuit behavior.
const knownUnavailableModel = detectKnownUnavailableModel(resolvedArgs);
if (knownUnavailableModel) {
  log(`fatal: known-unavailable model "${knownUnavailableModel}" detected ...`);
  appendStepSummary(`### ❌ Codex model preflight failed
- Offending model: \`${knownUnavailableModel}\`
- Remediation: use a supported GA Codex model (e.g. \`gpt-5.4-mini\`).`);
  process.exit(1);
}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix 404 error by removing Codex alpha snapshot pinning Codex: fail fast on pinned unavailable alpha model and surface offending model in summaries Jun 28, 2026
Copilot AI requested a review from pelikhan June 28, 2026 09:30
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot fix the models .json by removing that model and ensure that this kind of model name pattern is refused

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan closed this Jun 28, 2026
@github-actions
github-actions Bot deleted the copilot/aw-failures-fix-codex-snapshot branch July 6, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants