agentHost: fix context picker for ChatGPT Codex models - #335517
Merged
Giuseppe Cianci (Giuspepe) merged 3 commits intoSep 10, 2026
Conversation
Reuse the matching Copilot catalog context tiers for ChatGPT-backed Codex models and refresh selected model metadata when catalogs republish it. Cover both provider routes and verify that context window and reasoning effort reach app-server requests.
Copilot started reviewing on behalf of
Giuseppe Cianci (Giuspepe)
September 10, 2026 17:22
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation is focused and well tested; the only finding is a non-blocking comment-concision cleanup.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/vs/workbench/contrib/chat/browser/widget/input/chatInputModelSelectionController.ts — This multi-line inline comment narrates the immediately following call. Condense it to a single… |
What changed in this PR
Adds context-size selection for ChatGPT Codex models by enriching them with matching Copilot catalog metadata.
Changes:
- Inherits context-size schemas for matching ChatGPT models.
- Refreshes selected-model metadata after catalog enrichment.
- Tests both Copilot and ChatGPT routing and configuration payloads.
| File | Description |
|---|---|
codexAgent.ts |
Enriches ChatGPT models with Copilot context-size metadata. |
codexModelRefresh.test.ts |
Tests context-size schema publication and removal. |
codexPrewarmEviction.test.ts |
Tests provider-specific thread configuration. |
chatInputModelSelectionController.ts |
Refreshes republished selected-model metadata. |
chatInputModelSelectionController.test.ts |
Verifies metadata refresh without reapplying selection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Read context limits from the Codex binary's JSON model catalog while keeping app-server model/list authoritative for account-visible models. This removes the ChatGPT picker dependency on a matching Copilot catalog entry.
Giuseppe Cianci (Giuspepe)
marked this pull request as ready for review
September 10, 2026 18:14
Giuseppe Cianci (Giuspepe)
enabled auto-merge (squash)
September 10, 2026 18:31
Ladislau Szomoru (lszomoru)
approved these changes
Sep 10, 2026
Giuseppe Cianci (Giuspepe)
deleted the
agents/fix-chatgpt-codex-context-picker
branch
September 10, 2026 18:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
model/listauthoritative for the ChatGPT models and reasoning levels available to the signed-in accountcodex debug modelsJSON view, using the app-server environment and configurationTesting
npm run compilenpm run hygienegit diff --checkmodel_context_window: 872000andthinkingLevel: highin the actual Codex app-server requests