Skip to content

codex: set default model to gpt-5.3-codex#34518

Merged
pelikhan merged 2 commits into
mainfrom
copilot/set-default-model-gpt-5-3-codex
May 24, 2026
Merged

codex: set default model to gpt-5.3-codex#34518
pelikhan merged 2 commits into
mainfrom
copilot/set-default-model-gpt-5-3-codex

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 24, 2026

The codex engine had no default model — when engine.model was unset and GH_AW_MODEL_AGENT_CODEX/GH_AW_MODEL_DETECTION_CODEX variables were absent, the fallback was an empty string (causing no --model flag) and GH_AW_INFO_MODEL showed the generic label "agent".

Changes

  • pkg/constants/engine_constants.go — adds CodexDefaultModel = "gpt-5.3-codex", parallel to CopilotBYOKDefaultModel
  • pkg/workflow/codex_engine.go — uses CodexDefaultModel as the || fallback in the generated env var expression:
    GH_AW_MODEL_AGENT_CODEX: ${{ vars.GH_AW_MODEL_AGENT_CODEX || 'gpt-5.3-codex' }}
    
  • pkg/workflow/compiler_yaml_lookups.gogetDefaultAgentModel("codex") returns CodexDefaultModel instead of "agent", so GH_AW_INFO_MODEL reflects the actual model
  • pkg/workflow/model_env_vars_test.go — updates agent and detection job assertions to expect gpt-5.3-codex fallback
  • pkg/workflow/wasm_golden_test.go — adds CodexDefaultModel normalization (mirrors CopilotBYOKDefaultModel handling) to keep golden fixtures stable across future default-model bumps
  • codex.golden — regenerated; also picks up two pre-existing golden diffs (regex-anchored include_only env names, removal of -c fetch="disabled") that were already failing on main before this PR

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Set default model for codex agentic engine to gpt-5.3-codex codex: set default model to gpt-5.3-codex May 24, 2026
Copilot AI requested a review from pelikhan May 24, 2026 18:49
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot merge main and recompile

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 24, 2026

@copilot merge main and recompile

Done — merged main (branch was already up to date) and recompiled all 235 lock files. 9 codex workflows were updated to use gpt-5.3-codex as the default model fallback (commit $(git rev-parse --short HEAD)).

@pelikhan pelikhan marked this pull request as ready for review May 24, 2026 19:40
Copilot AI review requested due to automatic review settings May 24, 2026 19:40
@pelikhan pelikhan merged commit 1b89a68 into main May 24, 2026
2 checks passed
@pelikhan pelikhan deleted the copilot/set-default-model-gpt-5-3-codex branch May 24, 2026 19:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR sets an explicit default model for the Codex engine (gpt-5.3-codex) so compiled workflows consistently pass a model when neither engine.model nor GH_AW_MODEL_AGENT_CODEX / GH_AW_MODEL_DETECTION_CODEX are set, and so GH_AW_INFO_MODEL reflects the real fallback model.

Changes:

  • Add constants.CodexDefaultModel and use it as the fallback for Codex agent + detection model env vars.
  • Update YAML lookup defaults so GH_AW_INFO_MODEL shows the Codex default rather than the generic "agent" label.
  • Update tests/golden normalization and regenerate golden/locked workflow outputs accordingly.
Show a summary per file
File Description
pkg/constants/engine_constants.go Introduces CodexDefaultModel constant used as Codex fallback model.
pkg/workflow/codex_engine.go Uses CodexDefaultModel when generating `${{ vars.*
pkg/workflow/compiler_yaml_lookups.go Returns CodexDefaultModel as the default model display value for Codex in GH_AW_INFO_MODEL.
pkg/workflow/model_env_vars_test.go Updates assertions to expect Codex default model fallback for agent + detection env vars.
pkg/workflow/wasm_golden_test.go Normalizes Codex default-model fallback to keep wasm golden fixtures stable across future default bumps.
pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden Updates Codex golden output to match new defaults and regenerated output.
.github/workflows/smoke-codex.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.
.github/workflows/schema-feature-coverage.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.
.github/workflows/necromancer.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.
.github/workflows/issue-arborist.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.
.github/workflows/grumpy-reviewer.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.
.github/workflows/duplicate-code-detector.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.
.github/workflows/daily-cache-strategy-analyzer.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.
.github/workflows/codex-github-remote-mcp-test.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.
.github/workflows/ai-moderator.lock.yml Regenerated lock workflow to reflect Codex default model fallback in env/run info.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 15/15 changed files
  • Comments generated: 1

Comment on lines 368 to 378
// Set the model environment variable.
// Codex has no native model env var, so model selection always goes through
// GH_AW_MODEL_AGENT_CODEX / GH_AW_MODEL_DETECTION_CODEX with shell expansion.
// When model is configured (static or GitHub Actions expression), set the env var directly.
// When not configured, use the GitHub variable fallback so users can set a default.
if modelConfigured {
codexEngineLog.Printf("Setting %s env var for model: %s", modelEnvVar, workflowData.EngineConfig.Model)
env[modelEnvVar] = workflowData.EngineConfig.Model
} else {
env[modelEnvVar] = fmt.Sprintf("${{ vars.%s || '' }}", modelEnvVar)
env[modelEnvVar] = fmt.Sprintf("${{ vars.%s || '%s' }}", modelEnvVar, constants.CodexDefaultModel)
}
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.

3 participants