OpenAI ChatGPT (Codex backend) OAuth auth plugin for opencode - use your ChatGPT Plus/Pro subscription instead of API credits
npm install opencode-openai-codex-auth!Image 1: opencode-openai-codex-auth
Curated by Numman Ali




One install. Every Codex model.
Install Β· Models Β· Configuration Β· Docs
---
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β ChatGPT OAuth β Codex backend β OpenCode β
β One command install, full model presets, done. β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
`
---
π Quick Start
`bash
npx -y opencode-openai-codex-auth@latest
`
Then:
`bash
opencode auth login
opencode run "write hello world to test.txt" --model=openai/gpt-5.2 --variant=medium
`
Legacy OpenCode (v1.0.209 and below):
`bash
npx -y opencode-openai-codex-auth@latest --legacy
opencode run "write hello world to test.txt" --model=openai/gpt-5.2-medium
`
Uninstall:
`bash
npx -y opencode-openai-codex-auth@latest --uninstall
npx -y opencode-openai-codex-auth@latest --uninstall --all
`
---
π¦ Models
- gpt-5.2 (none/low/medium/high/xhigh)
- gpt-5.2-codex (low/medium/high/xhigh)
- gpt-5.1-codex-max (low/medium/high/xhigh)
- gpt-5.1-codex (low/medium/high)
- gpt-5.1-codex-mini (medium/high)
- gpt-5.1 (none/low/medium/high)
---
π§© Configuration
- Modern (OpenCode v1.0.210+): config/opencode-modern.json
- Legacy (OpenCode v1.0.209 and below): config/opencode-legacy.jsonMinimal configs are not supported for GPTβ5.x; use the full configs above.
---
β
Features
- ChatGPT Plus/Pro OAuth authentication (official flow)
- 22 model presets across GPTβ5.2 / GPTβ5.2 Codex / GPTβ5.1 families
- Variant system support (v1.0.210+) + legacy presets
- Multimodal input enabled for all models
- Usageβaware errors + automatic token refresh
---
π Docs
- Getting Started: docs/getting-started.md
- Configuration: docs/configuration.md
- Troubleshooting: docs/troubleshooting.md
- Architecture: docs/development/ARCHITECTURE.md`Built for developers who value simplicity.