Skip to content

Guide Codex workflows to compatible Copilot models - #58872

Merged
pelikhan merged 3 commits into
mainfrom
copilot/copilotspecial-model-selection-guidance
Sep 6, 2026
Merged

Guide Codex workflows to compatible Copilot models#58872
pelikhan merged 3 commits into
mainfrom
copilot/copilotspecial-model-selection-guidance

Conversation

Copilot AI commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Codex requires Codex-capable models for features such as custom tools. General-purpose copilot/* models can fail at runtime with unsupported-model or tool errors.

  • Compiler guidance

    • Warn when Codex targets GitHub inference with a non-Codex model.
    • Skip warnings for runtime expressions and Codex-compatible models.
  • Workflow migration

    • Move 46 affected workflows to copilot/gpt-5.3-codex.
    • Regenerate their compiled lock files.
  • Documentation

    • Replace copilot/auto examples with a Codex-compatible selection.
    • Document the model capability requirement.
engine: codex
model: copilot/gpt-5.3-codex

Copilot AI and others added 2 commits September 5, 2026 20:37
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • github.com
  • proxy.golang.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"
    - "proxy.golang.org"

See Network Configuration for more information.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel completed test quality analysis.

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer completed successfully!

Lean already. Ship.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • ab.chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"

See Network Configuration for more information.

Generated by Ponytail Reviewer for #58872

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

reviewed_at: 2026-09-05T21:57:33Z
review_event: REQUEST_CHANGES
top_themes:
  - codex-model-compatibility-validation-too-permissive
files_reviewed:
  - .changeset/codex-copilot-model.md
  - docs/src/content/docs/engines/codex.md
  - docs/src/content/docs/reference/glossary.md
  - pkg/workflow/compiler_orchestrator_workflow.go
  - pkg/workflow/configured_model_validation.go
  - pkg/workflow/configured_model_validation_test.go
comment_count: 1

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 49.5 AIC · ⌖ 7.39 AIC · ⊞ 21.8K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes

The compiler-side warning is a good idea, but the new compatibility check is still too loose to rely on for model safety.

Blocking themes
  • The warning currently treats any model name containing codex as compatible, which is a brittle substring heuristic rather than an explicit compatibility check.
  • The bulk workflow migration is fine on its own; the blocking concern is that the compiler guidance can silently miss incompatible future model names.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 49.5 AIC · ⌖ 7.39 AIC · ⊞ 21.8K
Comment /review to run again

baseModel := strings.SplitN(model, "?", 2)[0]
usesGitHubInference := strings.HasPrefix(baseModel, "copilot/") ||
NewCodexEngine().ResolveLLMProvider(data) == LLMProviderGitHub
if !usesGitHubInference || strings.Contains(baseModel, "codex") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This warning gate is using strings.Contains(baseModel, "codex") as the compatibility test, which means any future or malformed GitHub model name that happens to include codex will bypass the warning even if the runtime still lacks the capabilities Codex needs.

💡 Why this should be tightened

Right now the guard is effectively a naming heuristic, not a compatibility check. That is fragile in exactly the place this change is supposed to protect: model selection. If GitHub adds a general-purpose model whose marketing name includes codex, or if an alias expands to such a name, the compiler will suppress the warning and the workflow will still fail later at runtime.

A safer pattern here is to check an explicit allowlist/predicate for known Codex-capable GitHub models instead of relying on a substring:

func isCompatibleCodexGitHubModel(model string) bool {
    baseModel := strings.SplitN(strings.ToLower(strings.TrimSpace(model)), "?", 2)[0]
    return baseModel == "copilot/gpt-5.3-codex"
}

If you need this to be forward-compatible, wire that predicate to the model inventory / alias resolution layer rather than embedding a free-form string match in the warning path.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor
🏗️ ADR required

I did not find an existing ADR in the PR body, and the current branch ADR set does not cover this change.

Evidence used

  • adr-prefetch-summary.json: ADR enforcement is required because this PR adds 120 lines in default business-logic directories (>100 threshold).
  • pr.json: the PR states Codex requires Codex-capable models for custom tools and other capabilities.
  • pr.diff / pr-files.json: the implementation migrates affected Codex workflows from copilot/mai-code-1-flash-picker to copilot/gpt-5.3-codex and updates compiled lock files accordingly.
  • docs/adr/: the latest ADRs on the branch stop at ADR-58796 and none document this model-selection rule.

Action taken

  • Added draft ADR: docs/adr/58872-require-codex-capable-models-for-codex-workflows.md

Next action for the author

  • Review and refine the draft ADR, especially the exact compatibility rule and warning behavior, before merging this PR.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • github.com
  • proxy.golang.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"
    - "proxy.golang.org"

See Network Configuration for more information.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · gpt54 · 35.4 AIC · ⌖ 6.52 AIC · ⊞ 9.8K ·
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /tdd and /codebase-design to the core change (pkg/workflow/configured_model_validation.go + tests). The rest of the diff is a mechanical model rename (copilot/mai-code-1-flash-picker to copilot/gpt-5.3-codex) across 46 workflow .md/.lock.yml pairs plus docs.

📋 Review notes

The new warnCodexCopilotModelCompatibility function is small, single-purpose, and well covered: the accompanying test table exercises general-purpose Copilot models, copilot/auto, an explicit GitHub provider override, a Codex-capable model, runtime expression models, non-Copilot providers, and the copilot engine (no warning) — good edge-case coverage per /tdd.

The function fits the existing Compiler.warn* pattern (warnUnknownConfiguredModels sits right next to it and follows the same stderr/IncrementWarningCount shape), so it is consistent with the codebase's existing vocabulary per /codebase-design. Ran go test ./pkg/workflow/ -run TestWarnCodex and -run TestWarnUnknownConfiguredModels locally — both pass.

No blocking issues found. The bulk lock-file/frontmatter changes are auto-generated and match the intended model swap.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 46.5 AIC · ⌖ 14.6 AIC · ⊞ 10.3K
Comment /matt to run again

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The compiler warning logic is targeted and covered by tests, and the workflow/doc updates consistently migrate to a Codex-capable model.

Pull request overview

Adds compiler-time guidance to help Codex workflows avoid incompatible general-purpose copilot/* models when routing through GitHub-hosted inference, and migrates affected workflows/docs to a Codex-capable model to prevent runtime tool/capability failures.

Changes:

  • Add a Codex + GitHub inference compatibility warning when a non-Codex Copilot model is configured (skipping runtime expressions and Codex-capable model names).
  • Update many Codex workflows to use copilot/gpt-5.3-codex and regenerate corresponding lock files.
  • Update Codex documentation/glossary and ship the behavior change via a changeset.
File summaries
File Description
pkg/workflow/configured_model_validation.go Adds compiler warning for Codex + GitHub inference when a non-Codex Copilot model is selected.
pkg/workflow/configured_model_validation_test.go Adds unit coverage for the new Codex/Copilot compatibility warning behavior.
pkg/workflow/compiler_orchestrator_workflow.go Wires the new warning into workflow validation.
docs/src/content/docs/reference/glossary.md Documents that Codex via GitHub-hosted inference requires Codex-capable models.
docs/src/content/docs/engines/codex.md Updates Codex engine docs to use a Codex-capable copilot/* model example.
.github/workflows/workflow-normalizer.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/workflow-normalizer.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/windows.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/windows.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/windows-grower.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/windows-grower.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/weekly-safe-outputs-spec-review.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/weekly-safe-outputs-spec-review.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/weekly-network-domains-audit.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/weekly-network-domains-audit.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/weekly-issue-summary.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/weekly-issue-summary.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/video-analyzer.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/video-analyzer.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/update-astro.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/update-astro.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/terminal-stylist.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/terminal-stylist.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/super-linter.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/super-linter.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/sub-issue-closer.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/stale-repo-identifier.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/smoke-test-tools.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/smoke-test-tools.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/smoke-temporary-id.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/smoke-service-ports.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/smoke-service-ports.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/smoke-otel-backends.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/smoke-otel-backends.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/smoke-drive.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/smoke-drive.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/smoke-ci.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/smoke-ci.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/skillet.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/skillet.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/sighthound-security-scan.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/sighthound-security-scan.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/security-review.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/research.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/repo-tree-map.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/repo-tree-map.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/refactoring-cadence.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/refactoring-cadence.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/python-data-charts.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/python-data-charts.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/purelock.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/ponytail-reviewer.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/ponytail-reviewer.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/pdf-summary.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/pdf-summary.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/outcome-collector.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/outcome-collector.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/metrics-collector.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/metrics-collector.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/issue-triage-agent.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/issue-monster.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/github-remote-mcp-auth-test.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/github-remote-mcp-auth-test.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/front-page-copy-guard.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/front-page-copy-guard.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/feature-grower.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/feature-grower.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/duplicate-code-detector.md Updates workflow example from copilot/auto to a Codex-capable Copilot model.
.github/workflows/daily-windows-terminal-integration-builder.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/daily-windows-defender-scan.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/daily-windows-defender-scan.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/daily-storify.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/daily-max-ai-credits-test.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/daily-max-ai-credits-test.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/daily-evals-report.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/daily-credit-limit-test.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/daily-credit-limit-test.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/daily-architecture-diagram.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/copilot-centralization-optimizer.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/copilot-centralization-optimizer.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/copilot-centralization-drilldown.md Migrates workflow model to copilot/gpt-5.3-codex.
.github/workflows/copilot-centralization-drilldown.lock.yml Regenerates lock file to reflect the model migration.
.github/workflows/api-consumption-report.md Migrates workflow model to copilot/gpt-5.3-codex.
.changeset/codex-copilot-model.md Records the new warning/recommendation behavior as a minor change.
Review details
  • Files reviewed: 99/99 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +115 to +117
reader, writer, err := os.Pipe()
require.NoError(t, err)
os.Stderr = writer

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the Codex/Copilot model compatibility change end-to-end (compiler warning logic, orchestrator wiring, docs, and workflow migrations).

Findings:

  • warnCodexCopilotModelCompatibility correctly scopes to the codex engine, skips runtime expressions (${{ ... }}) and blank models, and only warns when GitHub inference is used with a non-Codex model. Logic matches the accompanying unit tests (TestWarnCodexCopilotModelCompatibility), including the copilot/auto, explicit LLMProvider: github, and copilot/gpt-5.3-codex?effort=high (query-string) cases.
  • warnUnknownConfiguredModels cleanly delegates to the optional configuredModelValidator hook without behavior change when unset — verified by TestWarnUnknownConfiguredModelsWithoutInventory.
  • Wiring in validateWorkflowBuildContext (compiler_orchestrator_workflow.go) calls both warnings after model alias validation and before engine settings validation — no ordering issues.
  • The 46 workflow migrations to copilot/gpt-5.3-codex and regenerated lock files are mechanical and consistent with the new compiler guidance.
  • Documentation updates in docs/src/content/docs/engines/codex.md and the glossary correctly reflect the new model-capability requirement.
  • Ran go test ./pkg/workflow/... -run TestWarnCodexCopilotModelCompatibility|TestWarnUnknownConfiguredModels — all pass.

No blocking issues found. This is a backend/compiler change with no UI surface, so Impeccable UI-focused modes (critique/audit/harden/etc.) don't apply; reviewed for correctness and test coverage instead.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 66.9 AIC · ⌖ 13.3 AIC · ⊞ 8.3K

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Category: bug | Risk: high | Score: 74 | Action: fast_track | Batch: workflow-reliability.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.github.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.github.com"
    - "github.com"

See Network Configuration for more information.

Generated by 🔧 PR Triage Agent · copilot · mai10 · 24.4 AIC · ⌖ 2.76 AIC · ⊞ 16.5K ·

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Great work, @app/copilot-swe-agent! 🚀 This PR is well-executed and ready for review.

Summary

This change addresses a critical runtime issue: Codex workflows require Codex-capable models (e.g., copilot/gpt-5.3-codex) rather than general-purpose ones. Your implementation is comprehensive and focused:

Compiler validation — Added guardrails in configured_model_validation.go to warn when Codex targets GitHub inference with an incompatible model, with proper handling of runtime expressions and compatible models.

Workflow migration — Systematically updated 46 affected workflows to use the Codex-capable model, with regenerated lock files.

Documentation & ADR — Replaced copilot/auto examples and documented the model capability requirement with a clear Architecture Decision Record.

Test coverage — Added 90 lines of unit tests in configured_model_validation_test.go covering the validation logic.

Quality Signals

  • Tests included and focused on the new validation logic
  • Large diff justified by systematic workflow migration + documentation updates
  • Clear problem statement and solution in the PR description
  • Proper use of changeset for tracking

This looks ready for review by the core team. The mechanical bulk of lock-file updates is expected and the core logic addition is well-tested.

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • api.github.com
  • github.com

[!TIP]
api.github.com is blocked because GitHub API access uses the built-in GitHub tools by default. Instead of adding api.github.com to network.allowed, use tools.github.mode: gh-proxy for direct pre-authenticated GitHub CLI access without requiring network access to api.github.com:

tools:
  github:
    mode: gh-proxy

See GitHub Tools for more information on gh-proxy mode.

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.github.com"
    - "github.com"

See Network Configuration for more information.

Generated by ✅ Contribution Check · copilot · auto · 61.1 AIC · ⌖ 7.66 AIC · ⊞ 9.3K ·

@pelikhan
pelikhan merged commit b3d0bd9 into main Sep 6, 2026
@pelikhan
pelikhan deleted the copilot/copilotspecial-model-selection-guidance branch September 6, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants