To install, use the installation script:
curl -fsSL https://raw.githubusercontent.com/iamEvanYT/forked-opencode/refs/heads/main/install.sh | bash- Improve Premium Request handling for GitHub Copilot provider.
- Optional Codex proxy support for ChatGPT Pro/Plus OAuth traffic.
This fork can route Codex requests through a proxy without changing the OAuth flow. OpenCode still obtains the normal ChatGPT OAuth tokens, then sends the resulting Codex HTTP requests to your proxy instead of directly to chatgpt.com.
Recommended proxy:
Supported env vars:
export OPENCODE_CODEX_PROXY_BASE_URL=http://localhost:3000
export OPENCODE_CODEX_PROXY_ACCESS_CODE=your-local-gateBehavior:
- If
OPENCODE_CODEX_PROXY_BASE_URLis unset, Codex requests go directly to the normal Codex endpoint. - If
OPENCODE_CODEX_PROXY_BASE_URLis set, Codex requests are sent to that proxy base URL. - If
OPENCODE_CODEX_PROXY_ACCESS_CODEis set, OpenCode adds it as thex-access-codeheader on proxied Codex requests. - The proxy access code is only for your proxy. OpenCode still sends the normal upstream OAuth headers like
authorizationandChatGPT-Account-Id, and the proxy should forward those to Codex.