Codex Subscription Provider for Copilot
An unofficial Visual Studio Code extension that connects GitHub Copilot Chat to
local Codex models using your ChatGPT subscription. Codex handles reasoning
while Copilot executes tools and workspace edits, without requiring an OpenAI
API key.
[!IMPORTANT]
This is an independent, unofficial project. It is not affiliated with or
endorsed by OpenAI, GitHub, or Microsoft.
简体中文
How It Works
GitHub Copilot Agent
-> conversation, images, selected model, and available tools
Codex Subscription Provider
-> local Codex runtime and ChatGPT/Codex subscription
Codex
-> text response or structured tool-call request
Provider
-> response returned to Copilot Agent
GitHub Copilot Agent
-> executes VS Code tools, MCP calls, and workspace edits
The provider does not register or execute SAP, MCP, terminal, or file-editing
tools itself. It only forwards the tools supplied by Copilot for the current
request. Copilot remains responsible for tool execution, confirmation, and
virtual-file changes.
Features
- Explicit Codex model selection in the Copilot model picker
- Configurable model reasoning effort
- Image and screenshot input
- Structured forwarding and required-call enforcement for Copilot tools
- Action evidence checks for read, write, activation, and test workflows
- One-time setup for health checks, performance, and tool policy
- ChatGPT subscription authentication with API-key authentication rejected
- Automatic discovery of the local Codex runtime
- Read-only, isolated Codex working directory with network and MCP disabled
- Runtime, model-catalog, ABAP FS tool, and last-request diagnostics
- No extension-specific analytics or telemetry
Requirements
- Visual Studio Code
1.109.0 or later
- GitHub Copilot Chat in Agent mode
- Codex signed in with Sign in with ChatGPT
- For the Thin distribution, an official Codex runtime available from an
explicitly configured path, the system
PATH, or the official OpenAI VS Code
extension
Installation
Install the Thin distribution from the
Visual Studio Marketplace,
or install a VSIX from
GitHub Releases.
The one-time setup verifies the environment and offers a recommended Balanced
performance profile and require-for-actions tool policy.
After installation:
- Run
Developer: Reload Window.
- Complete the one-time setup or run
Codex Subscription Provider: Run Health Check.
- Open Copilot Chat and switch to Agent mode.
- Select an explicit
Codex Subscription | ... model.
- Enable only the tools needed for the task, including ABAP FS tools when
working with SAP virtual files.
- Ask Copilot to analyze, edit, review, activate, or test your workspace.
Configuration
{
"copilotCodexProvider.runtimeMode": "auto",
"copilotCodexProvider.codexExecutablePath": "",
"copilotCodexProvider.modelSource": "discovered",
"copilotCodexProvider.enabledModels": [],
"copilotCodexProvider.reasoningEffort": "medium",
"copilotCodexProvider.toolUsePolicy": "require-for-actions",
"copilotCodexProvider.missingToolBehavior": "notify-and-stop",
"copilotCodexProvider.showOnboarding": true
}
Runtime Modes
auto: configured path, system PATH, official OpenAI VS Code extension,
then the bundled runtime when available.
external: require an external official Codex runtime.
bundled: require the runtime included in a Full distribution.
The extension discovers subscription-visible models through the local
codex app-server model catalog. Each model is exposed as a separate Copilot
model-picker entry. The selected model ID is passed to Codex without a silent
fallback.
Use Codex Subscription Provider: Choose Performance Profile to select:
Fast: low reasoning
Balanced: medium reasoning
Deep: high reasoning
The underlying reasoningEffort setting also supports model-default,
minimal, low, medium, high, xhigh, max, and ultra. Unsupported
values are rejected instead of silently downgraded.
copilot-default: follow the tool mode supplied by Copilot.
require-for-actions: require tool-result evidence for detected read, write,
activation, and test actions.
strict-abapfs: apply action enforcement only in ABAP or SAP context.
With the recommended notify-and-stop missing-tool behavior, the provider
stops before calling Codex when Copilot does not supply a required capability.
It then identifies the missing capability instead of allowing an ungrounded
claim that an action was completed.
The provider can only enforce tools that Copilot supplies. It does not bypass
Copilot or call ABAP FS/MCP tools directly.
- Up to 20 images and 50 MiB per request
- Duplicate images removed using SHA-256
- Temporary image files deleted after each request
- Requests rejected when the selected model does not declare image support
Diagnostics
Codex Subscription Provider: Manage
Codex Subscription Provider: Run Health Check
Codex Subscription Provider: Check Codex Runtime
Codex Subscription Provider: Check ABAP FS Tools
Codex Subscription Provider: Refresh Models
Codex Subscription Provider: Show Available Models
Codex Subscription Provider: Show Last Request Details
Codex Subscription Provider: Reset Onboarding
Privacy and Security
The extension checks the local Codex ChatGPT authentication state and removes
common API-key and custom OpenAI endpoint variables before starting Codex. It
does not log prompts, source code, image contents, credentials, tool arguments,
or tool results.
Requests are processed by the selected local Codex runtime under the applicable
OpenAI terms. Copilot and any enabled MCP tools remain subject to their own
terms and privacy policies.
See PRIVACY.md, SECURITY.md, and
THIRD_PARTY_NOTICES.md for details.
Development
npm ci
npm run validate
npm run package:thin
The test suite covers subscription-auth validation, runtime resolution, model
catalog parsing, image handling, action and tool-capability policies, structured
tool-call bridging, and SDK loading.
Contributions are welcome. Read CONTRIBUTING.md before
opening an issue or pull request.
Distributions
| Distribution |
Target |
Runtime |
| Thin |
Marketplace and cross-platform VSIX |
Uses an official runtime installed by the user |
| Full Win64 |
GitHub Release for Windows x64 |
Includes the official Codex runtime |
Marketplace releases use the Thin package. Full Win64 packages are distributed
only through GitHub Releases.
License
The extension source code is licensed under the MIT License. OpenAI
Codex components retain their original Apache-2.0 license.