Codex API Proxy
VS Code sidebar extension for starting and monitoring a local Node.js proxy that exposes the authenticated Codex App Server through OpenAI-compatible Responses and Chat Completions APIs.
Use it for local development and testing with clients that expect an OpenAI-compatible API. It reuses the authenticated Codex CLI session, so no separate billable OpenAI API key is required. This project is intended for development and testing, not production use.
Requirements
- VS Code 1.85 or newer
- Codex CLI installed and authenticated (
codex login)
codex available on PATH
Development
Open this repository in VS Code and press F5. The Extension Development Host opens with the Codex API Proxy view in the activity bar.
Run the checks with:
npm run check
npm test
The proxy runs inside the VS Code extension host and needs no separate Python runtime.
Settings
codexApiProxy.port: localhost port, default 9000.
codexApiProxy.model: model and reasoning effort, default gpt-5.6-luna|medium.
The sidebar displays the last 10 calls. Public request model labels are accepted without restricting the backend model selected in the sidebar.
The proxy also exposes GET /v1/models and GET /v1/models/{id} with a catalog of common OpenAI model IDs. The catalog is for client compatibility; requests still run through the Codex backend model selected in the sidebar.
Build and publish
VERSION is the release version source of truth. The build stamps the version into the VSIX manifest and sidebar title. Build a VSIX:
./build_extension.sh
code --install-extension codex-api-proxy-$(tr -d '[:space:]' < VERSION).vsix
Install the current build locally with:
./dev_install.sh
Set VSCODE_CLI when the VS Code command is not named code.
Before publishing, replace publisher: "local" in package.json with your verified VS Code Marketplace publisher ID, then authenticate vsce with a Marketplace Personal Access Token:
npx --yes @vscode/vsce login YOUR_PUBLISHER_ID
npx --yes @vscode/vsce publish
The package includes only the extension entry point, Node.js proxy, manifest, license, README, and changelog. Tests and development files are excluded by .vscodeignore.