GHCP Proxy provides an OpenAI-compatible local endpoint for using GitHub Copilot with Codex and the ChatGPT app. Claude Code is also supported through a compatibility integration.
For organizations that provide the official ChatGPT Excel add-in but do not enable ChatGPT for Work or direct Codex access, GHCP Proxy can alternatively route Codex through the backend available to the authenticated Excel add-in session.
The dashboard handles authentication, integrations, usage, cost estimates, and optional startup management.
| Client | Backend | Use |
|---|---|---|
| Codex and ChatGPT app | GitHub Copilot | Default |
| Codex | ChatGPT Excel backend | Alternative when organizational access is provided through Excel |
| Claude Code | GHCP Proxy compatibility route | Optional |
GHCP Proxy listens on loopback only.
API: http://127.0.0.1:8000/v1
Dashboard: http://127.0.0.1:8000/
- Python 3.11 or newer
- GitHub Copilot access when using the Copilot backend
- Codex, the ChatGPT app, or Claude Code for the client you want to configure
- Excel desktop with the official ChatGPT add-in signed in when using the Excel backend
From the repository directory:
python3 -m venv .venv
./.venv/bin/python -m pip install --upgrade pip
./.venv/bin/python -m pip install -r requirements.txt
./.venv/bin/python proxy.pyFrom the repository directory:
py -3 -m venv .venv
./.venv/Scripts/python.exe -m pip install --upgrade pip
./.venv/Scripts/python.exe -m pip install -r requirements.txt
./.venv/Scripts/python.exe ./proxy.pyThen open http://127.0.0.1:8000/.
On the first run:
- Sign in to GitHub if prompted.
- Open Integrations.
- Enable the clients you want to use.
- Optionally install the start and stop commands.
- Optionally enable startup at login.
- Restart any clients that were already running.
Node.js, npx, and manually edited client configuration files are not required for normal setup.
Start the proxy with the repository virtual environment:
./.venv/bin/python proxy.pyIf you installed the helper commands:
start-ghproxyOn Windows PowerShell:
Start-GHProxyAfter changing an integration, restart the affected client so it reloads its provider configuration.
GitHub Copilot is the default backend. Use it when your GitHub account has Copilot access.
Some organizations enable the official ChatGPT add-in for Excel without enabling ChatGPT for Work or direct Codex access.
Because the Excel add-in already provides an authenticated OpenAI backend and can support code-execution workflows, similar coding tasks can be performed from Excel. However, reproducing an agent such as Codex inside Excel requires additional prompting and orchestration.
GHCP Proxy removes that indirection by connecting Codex directly to the backend available through the authenticated Excel add-in session. This lets Codex handle the coding workflow while the model requests use the organization's existing Excel access.
In current testing, this has used substantially fewer tokens than recreating a comparable Codex workflow through a large orchestration prompt inside Excel. This is an observed result, not a guaranteed token-reduction ratio.
Use one of the Excel model aliases to select this route:
gpt-6-astra-excel
gpt-6-luna-excel
gpt-6-sol-excel
gpt-5.6-luna-excel
gpt-5.6-terra-excel
gpt-5.6-sol-excel
These are examples, not a hard-coded availability list. The proxy discovers Excel models from the signed-in add-in's /basispoints/api/responses/access?include_models=true catalog and Copilot models separately from Copilot. It offers their union: Copilot models use their normal IDs, while available Excel models get an -excel suffix that is removed when routing to Excel. A model does not need to exist in both backends. Restricted Excel models and failed discovery do not create Excel options; failure of one backend does not hide models discovered from the other. For example, Excel can offer gpt-6-sol-excel while Copilot offers gpt-6.1-sol.
Reasoning effort options come from the Excel catalog; the current Sol, Luna, and Terra entries support low, medium, high, and xhigh. x-high is accepted as an alias for xhigh.
Models without an -excel alias continue to use GitHub Copilot.
No Excel-specific prompt prefix or additional prompting syntax is required.
The Excel backend uses the authenticated session created by the official ChatGPT add-in.
It does not require network capture, DevTools, a debugging port, custom certificates, or operating-system proxy changes.
Excel desktop must have the ChatGPT add-in signed in at least once. GHCP Proxy discovers the session from Office WebView2 local storage.
Check the detected session status with:
Invoke-RestMethod http://127.0.0.1:8000/api/config/excel-sessionExcel desktop must have the ChatGPT add-in open and signed in. GHCP Proxy discovers the session from the local WebKit storage used by Excel.
If the session is missing or expired, reopen or refresh the signed-in Excel task pane and retry the request.
Clear the cached session without stopping the proxy:
Invoke-RestMethod -Method Delete http://127.0.0.1:8000/api/config/excel-sessionThen reopen or refresh the ChatGPT add-in before retrying.
The dashboard tracks usage and provides local cost estimates by backend and token type.
GitHub Copilot and Excel-backed usage are tracked separately. Provider-side usage and billing records remain authoritative.
The Excel route uses access already available through the authenticated Excel add-in session. GHCP Proxy does not create or modify organizational entitlements.
For current GitHub Copilot pricing and limits, see:
The dashboard's Integrations page manages local client configuration. It can:
- connect Codex to GHCP Proxy
- connect the ChatGPT app to GHCP Proxy
- connect Claude Code to GHCP Proxy
- install start and stop commands
- enable or disable startup at login
- restore previous client configuration when an integration is disabled
Existing client configuration is backed up before replacement. Most users should manage integrations through the dashboard rather than editing configuration files manually.
Set environment variables before starting the proxy.
| Variable | Purpose | Default or notes |
|---|---|---|
GHCP_UPSTREAM_TIMEOUT_SECONDS |
Timeout for upstream non-streaming requests | 300 seconds |
GHCP_UPSTREAM_PROXY |
Proxy for HTTP and HTTPS upstream traffic | Can be overridden per protocol |
GHCP_HTTP_PROXY |
HTTP upstream proxy | Optional |
GHCP_HTTPS_PROXY |
HTTPS upstream proxy | Optional |
GHCP_NO_PROXY |
Hosts excluded from proxying | Optional |
GHCP_UPSTREAM_TLS_VERIFY |
Upstream TLS certificate verification | Configure as required |
GHCP_UPSTREAM_HTTP2 |
HTTP/2 for upstream requests | Configure as required |
Standard HTTP_PROXY, HTTPS_PROXY, and NO_PROXY variables are also honored.
Excel Responses streams have a 120-second read/progress idle timeout, rather
than a 120-second total generation limit. Keepalive pings do not reset it. If
an upstream stream stops sending model events, the proxy closes it and sends
response.failed. TLS failures, malformed HTTP chunks, and EOF without a
terminal Responses event also produce an explicit failure. The proxy does not
automatically replay interrupted streams, since that could duplicate tool
actions or token spend. A terminal Responses event ends the relay without
waiting for a trailing HTTP EOF. Excel connections use a five-second idle
keepalive expiry to limit stale connection reuse through network proxies.
Request traces retain HTTP 499 for downstream cancellations (not confirmed
delivery). Their stream lifecycle failure_category distinguishes
downstream_cancelled from upstream_transport_error; do not count every
non-success response as an upstream transport failure.
export GHCP_UPSTREAM_PROXY=http://proxy.example.com:8080
export GHCP_UPSTREAM_TLS_VERIFY=1
export GHCP_UPSTREAM_HTTP2=0
./.venv/bin/python proxy.pyInstall dependencies and launch the proxy using the same virtual environment:
./.venv/bin/python -m pip install -r requirements.txt
./.venv/bin/python proxy.pyWindows PowerShell:
./.venv/Scripts/python.exe -m pip install -r requirements.txt
./.venv/Scripts/python.exe ./proxy.pyCheck the terminal running proxy.py.
If it exited, resolve the reported error and restart it. If another process is using port 8000, stop the old GHCP Proxy instance or conflicting process first.
On macOS, the SDK runtime exports trusted certificates from the System and login
Keychains and combines them with the bundled public CA set. Restart the proxy
after changing enterprise certificate trust. Explicit SSL_CERT_FILE,
NODE_EXTRA_CA_CERTS, or CURL_CA_BUNDLE settings are preserved and take
precedence.
Keep the dashboard open while completing the GitHub device-code flow with the account that has Copilot access.
After approval, return to the dashboard and wait for the status to refresh.
Completely restart the client after changing its integration.
If necessary, disable and re-enable the integration from the dashboard and start a new client session.
Increase the timeout before starting the proxy:
export GHCP_UPSTREAM_TIMEOUT_SECONDS=600
./.venv/bin/python proxy.pyWindows PowerShell:
$env:GHCP_UPSTREAM_TIMEOUT_SECONDS = "600"
./.venv/Scripts/python.exe ./proxy.pyOpen the official ChatGPT add-in in Excel and confirm that it is signed in.
Refresh or reopen the task pane, then check:
http://127.0.0.1:8000/api/config/excel-session
If necessary, clear the cached session and retry.
Make sure the selected model uses an -excel alias:
gpt-6-astra-excel
gpt-6-luna-excel
gpt-6-sol-excel
gpt-5.6-luna-excel
gpt-5.6-terra-excel
gpt-5.6-sol-excel
Models without an Excel alias use GitHub Copilot.