Skip to content

agentHost: restrict Codex Copilot models to OpenAI - #333987

Merged
Giuseppe Cianci (Giuspepe) merged 3 commits into
mainfrom
agents/debug-codex-harness-model-issues
Sep 2, 2026
Merged

agentHost: restrict Codex Copilot models to OpenAI#333987
Giuseppe Cianci (Giuspepe) merged 3 commits into
mainfrom
agents/debug-codex-harness-model-issues

Conversation

@Giuspepe

@Giuspepe Giuseppe Cianci (Giuspepe) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #331354

Summary

  • Restrict the Copilot-backed Codex catalog to models whose vendor is OpenAI.
  • Retain the existing model-picker and Responses endpoint eligibility checks.
  • Add regression coverage showing xAI and Microsoft models are excluded while OpenAI models remain available.

Why

Some third-party models advertise the Responses endpoint but do not support the complete Codex request lifecycle. They can work in the Copilot harness yet fail after being selected in the Codex harness. This positive vendor filter keeps incompatible models out of Codex without changing the Copilot harness catalog.

Verification

  • npm run transpile-client
  • Codex model refresh unit suite: 54 passing
  • ESLint on both changed files
  • git diff --check
  • Live Code OSS verification of the Codex and Copilot model catalogs

Third-party models can advertise the Responses endpoint without supporting the complete Codex request lifecycle. Keep picker and endpoint eligibility checks while limiting the Codex harness catalog to models whose vendor is OpenAI.
Copilot AI balanced review requested due to automatic review settings September 2, 2026 13:41

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.

Copilot review overview

🟡 Changes recommended

Two shared Codex test fixtures lack the now-required vendor and leave their model catalogs empty.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 High severity

New issues introduced by this change (1)
Severity Finding
High severity src/​vs/​platform/​agentHost/​node/​codex/​codexAgent.ts — This predicate is also exercised by the shared createAgent fixtures in…
What changed in this PR

Restricts Codex’s Copilot-backed model catalog to OpenAI models while retaining existing eligibility checks.

Changes:

  • Adds an OpenAI vendor filter.
  • Adds regression coverage for excluded vendors.
  • Updates relevant model-refresh fixtures.
File Description
codexAgent.ts Filters Codex-compatible Copilot models by vendor.
codexModelRefresh.test.ts Tests vendor filtering and updates fixtures.

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

Comment thread src/vs/platform/agentHost/node/codex/codexAgent.ts
The OpenAI-only model filter relies on the required vendor field. Keep the shared create-chat and prewarm fixtures valid so their gpt-test model remains available.
@Giuspepe
Giuseppe Cianci (Giuspepe) marked this pull request as ready for review September 2, 2026 14:54
@Giuspepe
Giuseppe Cianci (Giuspepe) merged commit 23d0582 into main Sep 2, 2026
40 checks passed
@Giuspepe
Giuseppe Cianci (Giuspepe) deleted the agents/debug-codex-harness-model-issues branch September 2, 2026 15:02
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 2, 2026
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.

Non-gpt models shown for Codex harness

3 participants