codex-multi-auth 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +222 -98
- package/assets/readme-hero.svg +2 -2
- package/config/README.md +30 -87
- package/config/{opencode-legacy.json → codex-legacy.json} +571 -571
- package/config/{opencode-modern.json → codex-modern.json} +241 -239
- package/config/{minimal-opencode.json → minimal-codex.json} +15 -13
- package/config/schema/config.schema.json +21 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -20
- package/dist/index.js.map +1 -1
- package/dist/lib/accounts.d.ts +1 -1
- package/dist/lib/accounts.d.ts.map +1 -1
- package/dist/lib/auth/auth.d.ts +1 -1
- package/dist/lib/auth/auth.js +1 -1
- package/dist/lib/cli.d.ts +1 -1
- package/dist/lib/cli.js +4 -4
- package/dist/lib/cli.js.map +1 -1
- package/dist/lib/codex-manager/settings-hub.d.ts +6 -0
- package/dist/lib/codex-manager/settings-hub.d.ts.map +1 -0
- package/dist/lib/codex-manager/settings-hub.js +1786 -0
- package/dist/lib/codex-manager/settings-hub.js.map +1 -0
- package/dist/lib/codex-manager.d.ts.map +1 -1
- package/dist/lib/codex-manager.js +5 -1637
- package/dist/lib/codex-manager.js.map +1 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +20 -11
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/context-overflow.d.ts +1 -1
- package/dist/lib/context-overflow.js +1 -1
- package/dist/lib/oauth-success.html +1 -1
- package/dist/lib/prompts/codex-host-bridge.d.ts +19 -0
- package/dist/lib/prompts/codex-host-bridge.d.ts.map +1 -0
- package/dist/lib/prompts/{codex-opencode-bridge.js → codex-host-bridge.js} +143 -143
- package/dist/lib/prompts/codex-host-bridge.js.map +1 -0
- package/dist/lib/prompts/codex.d.ts +2 -2
- package/dist/lib/prompts/codex.d.ts.map +1 -1
- package/dist/lib/prompts/codex.js +3 -3
- package/dist/lib/prompts/host-codex-prompt.d.ts +25 -0
- package/dist/lib/prompts/host-codex-prompt.d.ts.map +1 -0
- package/dist/lib/prompts/{opencode-codex.js → host-codex-prompt.js} +136 -47
- package/dist/lib/prompts/host-codex-prompt.js.map +1 -0
- package/dist/lib/recovery/storage.d.ts +2 -2
- package/dist/lib/recovery/storage.js +2 -2
- package/dist/lib/recovery/types.d.ts +1 -1
- package/dist/lib/recovery/types.js +1 -1
- package/dist/lib/recovery.d.ts +1 -1
- package/dist/lib/recovery.d.ts.map +1 -1
- package/dist/lib/recovery.js +1 -4
- package/dist/lib/recovery.js.map +1 -1
- package/dist/lib/request/fetch-helpers.d.ts +3 -3
- package/dist/lib/request/fetch-helpers.d.ts.map +1 -1
- package/dist/lib/request/fetch-helpers.js +6 -2
- package/dist/lib/request/fetch-helpers.js.map +1 -1
- package/dist/lib/request/helpers/input-utils.d.ts +2 -2
- package/dist/lib/request/helpers/input-utils.d.ts.map +1 -1
- package/dist/lib/request/helpers/input-utils.js +14 -14
- package/dist/lib/request/helpers/input-utils.js.map +1 -1
- package/dist/lib/request/helpers/model-map.d.ts +2 -2
- package/dist/lib/request/helpers/model-map.js +2 -2
- package/dist/lib/request/request-transformer.d.ts +12 -12
- package/dist/lib/request/request-transformer.d.ts.map +1 -1
- package/dist/lib/request/request-transformer.js +23 -24
- package/dist/lib/request/request-transformer.js.map +1 -1
- package/dist/lib/runtime-paths.d.ts +4 -4
- package/dist/lib/runtime-paths.d.ts.map +1 -1
- package/dist/lib/runtime-paths.js +27 -9
- package/dist/lib/runtime-paths.js.map +1 -1
- package/dist/lib/storage/paths.d.ts +11 -0
- package/dist/lib/storage/paths.d.ts.map +1 -1
- package/dist/lib/storage/paths.js +146 -2
- package/dist/lib/storage/paths.js.map +1 -1
- package/dist/lib/storage.d.ts +1 -0
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/storage.js +106 -32
- package/dist/lib/storage.js.map +1 -1
- package/dist/lib/tools/hashline-tools.d.ts +1 -1
- package/dist/lib/tools/hashline-tools.d.ts.map +1 -1
- package/dist/lib/tools/hashline-tools.js +1 -1
- package/dist/lib/tools/hashline-tools.js.map +1 -1
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/ui/copy.d.ts +6 -6
- package/dist/lib/ui/copy.js +6 -6
- package/dist/lib/ui/copy.js.map +1 -1
- package/node_modules/@codex-ai/plugin/dist/index.d.ts +2 -0
- package/node_modules/@codex-ai/plugin/dist/index.js +2 -0
- package/node_modules/@codex-ai/plugin/dist/tool.d.ts +42 -0
- package/node_modules/@codex-ai/plugin/dist/tool.js +29 -0
- package/node_modules/@codex-ai/plugin/package.json +9 -0
- package/package.json +30 -16
- package/scripts/bench-format/{opencode.mjs → codex-host.mjs} +206 -205
- package/scripts/bench-format/models.mjs +111 -105
- package/scripts/benchmark-edit-formats.mjs +1162 -1161
- package/scripts/codex.js +40 -2
- package/scripts/install-codex-auth-utils.js +49 -0
- package/scripts/{install-opencode-codex-auth.js → install-codex-auth.js} +220 -193
- package/scripts/repo-hygiene.js +320 -0
- package/scripts/test-model-matrix.js +475 -423
- package/vendor/codex-ai-plugin/dist/index.d.ts +2 -0
- package/vendor/codex-ai-plugin/dist/index.js +2 -0
- package/vendor/codex-ai-plugin/dist/tool.d.ts +42 -0
- package/vendor/codex-ai-plugin/dist/tool.js +29 -0
- package/vendor/codex-ai-plugin/package.json +9 -0
- package/vendor/codex-ai-sdk/dist/index.d.ts +4 -0
- package/vendor/codex-ai-sdk/dist/index.js +2 -0
- package/vendor/codex-ai-sdk/package.json +8 -0
- package/assets/opencode-logo-ornate-dark.svg +0 -18
- package/dist/lib/prompts/codex-opencode-bridge.d.ts +0 -19
- package/dist/lib/prompts/codex-opencode-bridge.d.ts.map +0 -1
- package/dist/lib/prompts/codex-opencode-bridge.js.map +0 -1
- package/dist/lib/prompts/opencode-codex.d.ts +0 -25
- package/dist/lib/prompts/opencode-codex.d.ts.map +0 -1
- package/dist/lib/prompts/opencode-codex.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,162 +1,286 @@
|
|
|
1
1
|
# codex-multi-auth
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/codex-multi-auth)
|
|
4
|
-
[](https://www.npmjs.com/package/codex-multi-auth)
|
|
3
|
+
[](https://www.npmjs.com/package/codex-multi-auth)
|
|
4
|
+
[](https://www.npmjs.com/package/codex-multi-auth)
|
|
5
5
|
|
|
6
|
-
Codex CLI-first multi-account OAuth manager for the official
|
|
6
|
+
Codex CLI-first multi-account OAuth manager for the official `@openai/codex` CLI.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<img width="1270" height="729" alt="2026-02-28 12_54_58-prompt txt - Notepads" src="https://github.com/user-attachments/assets/0cecb77e-a6d3-432a-ba48-3577db0c7093" />
|
|
9
9
|
|
|
10
|
-
## Quick Start
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
> [!NOTE]
|
|
12
|
+
> Legacy scoped prerelease package `@ndycode/codex-multi-auth` is migration-only.
|
|
13
|
+
> Use `codex-multi-auth` for all new installs.
|
|
14
|
+
## What You Get
|
|
15
|
+
|
|
16
|
+
- Canonical `codex auth ...` workflow for account login, switching, checks, and diagnostics
|
|
17
|
+
- Multi-account OAuth pool with health-aware selection and automatic failover
|
|
18
|
+
- Project-scoped account storage under `~/.codex/multi-auth/projects/<project-key>/...`
|
|
19
|
+
- Interactive dashboard for account actions and settings
|
|
20
|
+
- Forecast, report, fix, and doctor commands for operational safety
|
|
21
|
+
- Flagged account verification and restore flow
|
|
22
|
+
- Session affinity and live account sync controls
|
|
23
|
+
- Proactive refresh and preemptive quota deferral controls
|
|
24
|
+
- Codex-oriented request/prompt compatibility with strict runtime handling
|
|
25
|
+
- Stable docs set for install, config, troubleshooting, and upgrade paths
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<details open>
|
|
30
|
+
<summary><b>Terms and Usage Notice</b></summary>
|
|
31
|
+
|
|
32
|
+
> [!CAUTION]
|
|
33
|
+
> This project uses OAuth account credentials and is intended for personal development use.
|
|
34
|
+
>
|
|
35
|
+
> By using this plugin, you acknowledge:
|
|
36
|
+
> - This is an independent open-source project, not an official OpenAI product
|
|
37
|
+
> - You are responsible for your own usage and policy compliance
|
|
38
|
+
> - For production/commercial workloads, use the OpenAI Platform API
|
|
39
|
+
|
|
40
|
+
</details>
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
<details open>
|
|
47
|
+
<summary><b>For Humans</b></summary>
|
|
48
|
+
|
|
49
|
+
### Option A: Standard install
|
|
13
50
|
|
|
14
51
|
```bash
|
|
15
|
-
npm
|
|
16
|
-
|
|
17
|
-
cd codex-multi-auth
|
|
18
|
-
npm install
|
|
19
|
-
npm run build
|
|
20
|
-
npm link
|
|
52
|
+
npm i -g @openai/codex
|
|
53
|
+
npm i -g codex-multi-auth
|
|
21
54
|
```
|
|
22
55
|
|
|
23
|
-
|
|
56
|
+
### Option B: Migrate from legacy scoped prerelease
|
|
24
57
|
|
|
25
58
|
```bash
|
|
26
|
-
codex
|
|
59
|
+
npm uninstall -g @ndycode/codex-multi-auth
|
|
60
|
+
npm i -g codex-multi-auth
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Option C: Verify wiring
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
codex --version
|
|
67
|
+
codex auth status
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
</details>
|
|
71
|
+
|
|
72
|
+
<details>
|
|
73
|
+
<summary><b>For LLM Agents</b></summary>
|
|
74
|
+
|
|
75
|
+
### Step-by-step
|
|
76
|
+
|
|
77
|
+
1. Install global packages:
|
|
78
|
+
- `npm i -g @openai/codex`
|
|
79
|
+
- `npm i -g codex-multi-auth`
|
|
80
|
+
2. Run first login flow with `codex auth login`
|
|
81
|
+
3. Validate state with `codex auth list` and `codex auth check`
|
|
82
|
+
4. Confirm routing with `codex auth forecast --live`
|
|
83
|
+
|
|
84
|
+
### Verification
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
codex auth status
|
|
27
88
|
codex auth list
|
|
28
89
|
codex auth check
|
|
29
90
|
```
|
|
30
91
|
|
|
31
|
-
|
|
92
|
+
</details>
|
|
32
93
|
|
|
33
|
-
|
|
94
|
+
---
|
|
34
95
|
|
|
35
|
-
##
|
|
96
|
+
## Quick Start
|
|
36
97
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
98
|
+
```bash
|
|
99
|
+
codex auth login
|
|
100
|
+
codex auth list
|
|
101
|
+
codex auth check
|
|
102
|
+
codex auth forecast --live
|
|
103
|
+
```
|
|
41
104
|
|
|
42
|
-
|
|
105
|
+
Day-1 command set:
|
|
43
106
|
|
|
44
|
-
|
|
107
|
+
```bash
|
|
108
|
+
codex auth switch 2
|
|
109
|
+
codex auth report --live --json
|
|
110
|
+
codex auth fix --dry-run
|
|
111
|
+
codex auth doctor --fix
|
|
112
|
+
```
|
|
45
113
|
|
|
46
|
-
|
|
47
|
-
| --- | --- |
|
|
48
|
-
| `codex auth login` | Add/manage accounts in the dashboard |
|
|
49
|
-
| `codex auth list` | See saved accounts and current account |
|
|
50
|
-
| `codex auth switch <index>` | Switch current account |
|
|
51
|
-
| `codex auth check` | Quick health + live session checks |
|
|
52
|
-
| `codex auth forecast --live` | Choose the best next account |
|
|
53
|
-
| `codex auth fix --dry-run` | Preview safe fixes |
|
|
54
|
-
| `codex auth fix` | Apply safe fixes |
|
|
55
|
-
| `codex auth doctor --fix` | Diagnose and auto-repair common issues |
|
|
56
|
-
| `codex auth report --live --json` | Full machine-readable report |
|
|
57
|
-
| `codex auth features` | Print all implemented feature areas |
|
|
114
|
+
---
|
|
58
115
|
|
|
59
|
-
|
|
116
|
+
## Command Toolkit
|
|
60
117
|
|
|
61
|
-
|
|
118
|
+
| Command | What it does |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| `codex auth login` | Open interactive account dashboard |
|
|
121
|
+
| `codex auth list` | List saved accounts and active account |
|
|
122
|
+
| `codex auth status` | Print short runtime/status summary |
|
|
123
|
+
| `codex auth switch <index>` | Set active account by index |
|
|
124
|
+
| `codex auth check` | Run quick account health checks |
|
|
125
|
+
| `codex auth verify-flagged` | Re-test flagged accounts and optionally restore |
|
|
126
|
+
| `codex auth forecast --live` | Forecast best next account with live probes |
|
|
127
|
+
| `codex auth report --live --json` | Generate machine-readable health report |
|
|
128
|
+
| `codex auth fix --dry-run` | Preview safe repairs |
|
|
129
|
+
| `codex auth fix --live --model gpt-5-codex` | Run repairs with live probe model |
|
|
130
|
+
| `codex auth doctor --fix` | Diagnose and apply safe fixes |
|
|
131
|
+
|
|
132
|
+
Compatibility aliases are also supported:
|
|
133
|
+
- `codex multi auth ...`
|
|
134
|
+
- `codex multi-auth ...`
|
|
135
|
+
- `codex multiauth ...`
|
|
136
|
+
|
|
137
|
+
---
|
|
62
138
|
|
|
63
139
|
## Dashboard Hotkeys
|
|
64
140
|
|
|
65
|
-
Main dashboard
|
|
141
|
+
### Main dashboard
|
|
66
142
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
|
|
143
|
+
| Key | Action |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| `Up` / `Down` | Move selection |
|
|
146
|
+
| `Enter` | Select/open |
|
|
147
|
+
| `1-9` | Quick switch |
|
|
148
|
+
| `/` | Search |
|
|
149
|
+
| `?` | Toggle help |
|
|
150
|
+
| `Q` | Back/cancel |
|
|
73
151
|
|
|
74
|
-
Account
|
|
152
|
+
### Account details
|
|
75
153
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
154
|
+
| Key | Action |
|
|
155
|
+
| --- | --- |
|
|
156
|
+
| `S` | Set current account |
|
|
157
|
+
| `R` | Refresh/re-login account |
|
|
158
|
+
| `E` | Enable/disable account |
|
|
159
|
+
| `D` | Delete account |
|
|
80
160
|
|
|
81
|
-
|
|
161
|
+
---
|
|
82
162
|
|
|
83
|
-
##
|
|
163
|
+
## Storage Paths
|
|
84
164
|
|
|
85
|
-
|
|
165
|
+
| File | Default path |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| Settings | `~/.codex/multi-auth/settings.json` |
|
|
168
|
+
| Accounts | `~/.codex/multi-auth/openai-codex-accounts.json` |
|
|
169
|
+
| Flagged accounts | `~/.codex/multi-auth/openai-codex-flagged-accounts.json` |
|
|
170
|
+
| Quota cache | `~/.codex/multi-auth/quota-cache.json` |
|
|
171
|
+
| Logs | `~/.codex/multi-auth/logs/codex-plugin/` |
|
|
172
|
+
| Per-project accounts | `~/.codex/multi-auth/projects/<project-key>/openai-codex-accounts.json` |
|
|
86
173
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```
|
|
174
|
+
Override root with `CODEX_MULTI_AUTH_DIR=<path>`.
|
|
175
|
+
|
|
176
|
+
---
|
|
91
177
|
|
|
92
|
-
|
|
178
|
+
## Configuration
|
|
93
179
|
|
|
180
|
+
Primary config root:
|
|
94
181
|
- `~/.codex/multi-auth/settings.json`
|
|
95
182
|
- or `CODEX_MULTI_AUTH_DIR/settings.json` when custom root is set
|
|
96
183
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- [docs/reference/settings.md](docs/reference/settings.md)
|
|
184
|
+
Selected runtime/environment overrides:
|
|
100
185
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
186
|
+
| Variable | Effect |
|
|
187
|
+
| --- | --- |
|
|
188
|
+
| `CODEX_MULTI_AUTH_DIR` | Override settings/accounts root |
|
|
189
|
+
| `CODEX_MULTI_AUTH_CONFIG_PATH` | Alternate config file path |
|
|
190
|
+
| `CODEX_MODE=0/1` | Disable/enable Codex mode |
|
|
191
|
+
| `CODEX_TUI_V2=0/1` | Disable/enable TUI v2 |
|
|
192
|
+
| `CODEX_TUI_COLOR_PROFILE=truecolor|ansi256|ansi16` | TUI color profile |
|
|
193
|
+
| `CODEX_TUI_GLYPHS=ascii|unicode|auto` | TUI glyph style |
|
|
194
|
+
| `CODEX_AUTH_FETCH_TIMEOUT_MS=<ms>` | Request timeout override |
|
|
195
|
+
| `CODEX_AUTH_STREAM_STALL_TIMEOUT_MS=<ms>` | Stream stall timeout override |
|
|
104
196
|
|
|
105
|
-
|
|
197
|
+
Validate config after changes:
|
|
106
198
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
- Storage/path reference: [docs/reference/storage-paths.md](docs/reference/storage-paths.md)
|
|
113
|
-
- Upgrade guide: [docs/upgrade.md](docs/upgrade.md)
|
|
114
|
-
- Privacy/data handling: [docs/privacy.md](docs/privacy.md)
|
|
115
|
-
|
|
116
|
-
Maintainer docs:
|
|
199
|
+
```bash
|
|
200
|
+
codex auth status
|
|
201
|
+
codex auth check
|
|
202
|
+
codex auth forecast --live
|
|
203
|
+
```
|
|
117
204
|
|
|
118
|
-
|
|
119
|
-
- Config fields: [docs/development/CONFIG_FIELDS.md](docs/development/CONFIG_FIELDS.md)
|
|
120
|
-
- Config flow: [docs/development/CONFIG_FLOW.md](docs/development/CONFIG_FLOW.md)
|
|
121
|
-
- Testing: [docs/development/TESTING.md](docs/development/TESTING.md)
|
|
122
|
-
- TUI parity checklist: [docs/development/TUI_PARITY_CHECKLIST.md](docs/development/TUI_PARITY_CHECKLIST.md)
|
|
205
|
+
---
|
|
123
206
|
|
|
124
|
-
|
|
207
|
+
## Troubleshooting
|
|
125
208
|
|
|
126
|
-
|
|
209
|
+
<details open>
|
|
210
|
+
<summary><b>60-second recovery</b></summary>
|
|
127
211
|
|
|
128
212
|
```bash
|
|
129
213
|
codex auth doctor --fix
|
|
130
|
-
codex auth
|
|
214
|
+
codex auth check
|
|
131
215
|
codex auth forecast --live
|
|
132
216
|
```
|
|
133
217
|
|
|
134
|
-
If
|
|
218
|
+
If still broken:
|
|
135
219
|
|
|
136
220
|
```bash
|
|
137
|
-
|
|
138
|
-
codex --version
|
|
139
|
-
codex auth status
|
|
140
|
-
codex multi auth status
|
|
221
|
+
codex auth login
|
|
141
222
|
```
|
|
142
223
|
|
|
143
|
-
|
|
224
|
+
</details>
|
|
225
|
+
|
|
226
|
+
<details>
|
|
227
|
+
<summary><b>Common symptoms</b></summary>
|
|
228
|
+
|
|
229
|
+
- `codex auth` unrecognized: run `where codex`, then try `codex multi auth status`
|
|
230
|
+
- Switch succeeds but wrong account appears active: run `codex auth switch <index>`, then restart session
|
|
231
|
+
- OAuth callback on port `1455` fails: free the port and re-run `codex auth login`
|
|
232
|
+
- `missing field id_token` / `token_expired` / `refresh_token_reused`: re-login affected account
|
|
233
|
+
|
|
234
|
+
</details>
|
|
144
235
|
|
|
145
|
-
|
|
236
|
+
<details>
|
|
237
|
+
<summary><b>Diagnostics pack</b></summary>
|
|
146
238
|
|
|
147
239
|
```bash
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
240
|
+
codex auth list
|
|
241
|
+
codex auth status
|
|
242
|
+
codex auth check
|
|
243
|
+
codex auth verify-flagged --json
|
|
244
|
+
codex auth forecast --live
|
|
245
|
+
codex auth fix --dry-run
|
|
246
|
+
codex auth report --live --json
|
|
247
|
+
codex auth doctor --json
|
|
152
248
|
```
|
|
153
249
|
|
|
154
|
-
|
|
250
|
+
</details>
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Documentation
|
|
255
|
+
|
|
256
|
+
- Docs portal: [docs/README.md](docs/README.md)
|
|
257
|
+
- Getting started: [docs/getting-started.md](docs/getting-started.md)
|
|
258
|
+
- Features: [docs/features.md](docs/features.md)
|
|
259
|
+
- Configuration: [docs/configuration.md](docs/configuration.md)
|
|
260
|
+
- Troubleshooting: [docs/troubleshooting.md](docs/troubleshooting.md)
|
|
261
|
+
- Commands reference: [docs/reference/commands.md](docs/reference/commands.md)
|
|
262
|
+
- Settings reference: [docs/reference/settings.md](docs/reference/settings.md)
|
|
263
|
+
- Storage paths: [docs/reference/storage-paths.md](docs/reference/storage-paths.md)
|
|
264
|
+
- Upgrade guide: [docs/upgrade.md](docs/upgrade.md)
|
|
265
|
+
- Privacy: [docs/privacy.md](docs/privacy.md)
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Release Notes
|
|
270
|
+
|
|
271
|
+
- Current stable: [docs/releases/v0.1.1.md](docs/releases/v0.1.1.md)
|
|
272
|
+
- Previous stable: [docs/releases/v0.1.0.md](docs/releases/v0.1.0.md)
|
|
273
|
+
- Archived prerelease: [docs/releases/v0.1.0-beta.0.md](docs/releases/v0.1.0-beta.0.md)
|
|
274
|
+
|
|
275
|
+
## License
|
|
155
276
|
|
|
156
|
-
|
|
277
|
+
MIT License. See [LICENSE](LICENSE).
|
|
157
278
|
|
|
158
|
-
|
|
279
|
+
<details>
|
|
280
|
+
<summary><b>Legal</b></summary>
|
|
159
281
|
|
|
160
|
-
-
|
|
161
|
-
-
|
|
282
|
+
- Not affiliated with OpenAI.
|
|
283
|
+
- "ChatGPT", "Codex", and "OpenAI" are trademarks of OpenAI.
|
|
284
|
+
- You assume responsibility for your own usage and compliance.
|
|
162
285
|
|
|
286
|
+
</details>
|
package/assets/readme-hero.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="300" viewBox="0 0 1200 300" role="img" aria-label="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="300" viewBox="0 0 1200 300" role="img" aria-label="Codex Multi-Auth OAuth">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
4
|
<stop offset="0%" stop-color="#0f172a" />
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<path d="M205 80 L235 220" />
|
|
21
21
|
</g>
|
|
22
22
|
<text x="420" y="120" fill="#e2e8f0" font-size="42" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif" font-weight="600">
|
|
23
|
-
|
|
23
|
+
Codex Multi-Auth OAuth
|
|
24
24
|
</text>
|
|
25
25
|
<text x="420" y="170" fill="#cbd5f5" font-size="24" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
|
|
26
26
|
ChatGPT Plus/Pro auth for GPT-5.2 and Codex models
|
package/config/README.md
CHANGED
|
@@ -1,87 +1,30 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
| File |
|
|
8
|
-
|
|
9
|
-
| [`
|
|
10
|
-
| [`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
## Why there are two templates
|
|
33
|
-
|
|
34
|
-
OpenCode v1.0.210+ added model `variants`, so one model entry can expose multiple reasoning levels. That keeps modern config much smaller while preserving the same effective presets.
|
|
35
|
-
|
|
36
|
-
Both templates include:
|
|
37
|
-
- GPT-5.2, GPT-5 Codex, GPT-5.1, GPT-5.1 Codex, GPT-5.1 Codex Max, GPT-5.1 Codex Mini
|
|
38
|
-
- Reasoning variants per model family
|
|
39
|
-
- `store: false` and `include: ["reasoning.encrypted_content"]`
|
|
40
|
-
- Context metadata (272k context / 128k output)
|
|
41
|
-
|
|
42
|
-
## Spark model note
|
|
43
|
-
|
|
44
|
-
The templates intentionally do **not** include `gpt-5.3-codex-spark` by default. Spark is often entitlement-gated at the account/workspace level, so shipping it by default causes avoidable startup failures for many users.
|
|
45
|
-
|
|
46
|
-
If your workspace is entitled, you can add Spark model IDs manually.
|
|
47
|
-
|
|
48
|
-
## Usage examples
|
|
49
|
-
|
|
50
|
-
Modern template (v1.0.210+):
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
opencode run "task" --model=openai/gpt-5.2 --variant=medium
|
|
54
|
-
opencode run "task" --model=openai/gpt-5-codex --variant=high
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Legacy template (v1.0.209 and below):
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
opencode run "task" --model=openai/gpt-5.2-medium
|
|
61
|
-
opencode run "task" --model=openai/gpt-5-codex-high
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Minimal config (advanced)
|
|
65
|
-
|
|
66
|
-
A barebones debug template is available at [`minimal-opencode.json`](./minimal-opencode.json). It omits the full preset catalog.
|
|
67
|
-
|
|
68
|
-
## Unsupported-model behavior
|
|
69
|
-
|
|
70
|
-
Current defaults are strict entitlement handling:
|
|
71
|
-
- `unsupportedCodexPolicy: "strict"` returns entitlement errors directly
|
|
72
|
-
- set `unsupportedCodexPolicy: "fallback"` (or `CODEX_AUTH_UNSUPPORTED_MODEL_POLICY=fallback`) to enable automatic fallback retries
|
|
73
|
-
- `fallbackToGpt52OnUnsupportedGpt53: true` keeps the legacy `gpt-5.3-codex -> gpt-5.2-codex` edge inside fallback mode
|
|
74
|
-
- `unsupportedCodexFallbackChain` lets you override fallback order per model
|
|
75
|
-
- Spark entitlement failures (`gpt-5.3-codex-spark`) force fallback immediately, even with strict policy, to support non-entitled workspaces
|
|
76
|
-
|
|
77
|
-
Default fallback chain (when policy is `fallback`):
|
|
78
|
-
- `gpt-5.3-codex -> gpt-5-codex -> gpt-5.2-codex`
|
|
79
|
-
- `gpt-5.3-codex-spark -> gpt-5-codex -> gpt-5.3-codex -> gpt-5.2-codex` (only relevant if Spark IDs are added manually)
|
|
80
|
-
- `gpt-5.2-codex -> gpt-5-codex`
|
|
81
|
-
- `gpt-5.1-codex -> gpt-5-codex`
|
|
82
|
-
|
|
83
|
-
## Additional docs
|
|
84
|
-
|
|
85
|
-
- Main config reference: [`docs/configuration.md`](../docs/configuration.md)
|
|
86
|
-
- Getting started: [`docs/getting-started.md`](../docs/getting-started.md)
|
|
87
|
-
- Troubleshooting: [`docs/troubleshooting.md`](../docs/troubleshooting.md)
|
|
1
|
+
# Config Templates
|
|
2
|
+
|
|
3
|
+
These files are example model/provider templates for `codex-multi-auth`.
|
|
4
|
+
|
|
5
|
+
## Primary (Codex-named)
|
|
6
|
+
|
|
7
|
+
| File | Purpose |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| [`codex-modern.json`](./codex-modern.json) | Modern variant-based template |
|
|
10
|
+
| [`codex-legacy.json`](./codex-legacy.json) | Legacy explicit-model template |
|
|
11
|
+
| [`minimal-codex.json`](./minimal-codex.json) | Minimal debug template |
|
|
12
|
+
|
|
13
|
+
## Notes
|
|
14
|
+
|
|
15
|
+
- These templates are optional for the OAuth account manager flow.
|
|
16
|
+
- Core auth commands use `codex auth login`.
|
|
17
|
+
|
|
18
|
+
## Defaults Included
|
|
19
|
+
|
|
20
|
+
- GPT-5.x Codex model families
|
|
21
|
+
- `store: false`
|
|
22
|
+
- `include: ["reasoning.encrypted_content"]`
|
|
23
|
+
- Sensible fallback behavior for unsupported model entitlements
|
|
24
|
+
|
|
25
|
+
## Related Docs
|
|
26
|
+
|
|
27
|
+
- [`../docs/configuration.md`](../docs/configuration.md)
|
|
28
|
+
- [`../docs/getting-started.md`](../docs/getting-started.md)
|
|
29
|
+
- [`../docs/reference/settings.md`](../docs/reference/settings.md)
|
|
30
|
+
|