oc-chatgpt-multi-auth 4.9.7 → 4.11.0
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 +191 -171
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +154 -10
- package/dist/index.js.map +1 -1
- package/dist/lib/accounts.d.ts +3 -0
- package/dist/lib/accounts.d.ts.map +1 -1
- package/dist/lib/accounts.js +7 -0
- package/dist/lib/accounts.js.map +1 -1
- package/dist/lib/config.d.ts +2 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +8 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/constants.d.ts +3 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +3 -1
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/logger.d.ts.map +1 -1
- package/dist/lib/logger.js +75 -11
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/prompts/codex-opencode-bridge.d.ts +1 -1
- package/dist/lib/prompts/codex-opencode-bridge.d.ts.map +1 -1
- package/dist/lib/prompts/codex-opencode-bridge.js +17 -6
- package/dist/lib/prompts/codex-opencode-bridge.js.map +1 -1
- package/dist/lib/refresh-queue.d.ts +15 -0
- package/dist/lib/refresh-queue.d.ts.map +1 -1
- package/dist/lib/refresh-queue.js +57 -4
- package/dist/lib/refresh-queue.js.map +1 -1
- package/dist/lib/storage.d.ts +2 -1
- package/dist/lib/storage.d.ts.map +1 -1
- package/dist/lib/storage.js +46 -2
- package/dist/lib/storage.js.map +1 -1
- package/dist/lib/types.d.ts +4 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# openai codex auth plugin for opencode
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/oc-chatgpt-multi-auth)
|
|
4
4
|
[](https://www.npmjs.com/package/oc-chatgpt-multi-auth)
|
|
5
5
|
[](https://github.com/ndycode/oc-chatgpt-multi-auth/actions)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
oauth plugin for opencode that lets you use chatgpt plus/pro rate limits with models like `gpt-5.2`, `gpt-5.2-codex`, and `gpt-5.1-codex-max`.
|
|
9
9
|
|
|
10
10
|
> [!NOTE]
|
|
11
|
-
> **
|
|
11
|
+
> **renamed from `opencode-openai-codex-auth-multi`** — if you were using the old package, update your config to use `oc-chatgpt-multi-auth` instead. the rename was necessary because opencode blocks plugins containing `opencode-openai-codex-auth` in the name.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## what you get
|
|
14
14
|
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
15
|
+
- **gpt-5.2, gpt-5.2 codex, gpt-5.1 codex max** and all gpt-5.x variants via chatgpt oauth
|
|
16
|
+
- **multi-account support** — add up to 20 chatgpt accounts, health-aware rotation with automatic failover
|
|
17
|
+
- **per-project accounts** — each project gets its own account storage (new in v4.10.0)
|
|
18
|
+
- **click-to-switch** — switch accounts directly from the opencode tui
|
|
19
|
+
- **strict tool validation** — automatically cleans schemas for compatibility with strict models
|
|
20
|
+
- **auto-update notifications** — get notified when a new version is available
|
|
20
21
|
- **22 model presets** — full variant system with reasoning levels (none/low/medium/high/xhigh)
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
22
|
+
- **prompt caching** — session-based caching for faster multi-turn conversations
|
|
23
|
+
- **usage-aware errors** — friendly messages with rate limit reset timing
|
|
24
|
+
- **plugin compatible** — works alongside other opencode plugins (oh-my-opencode, dcp, etc.)
|
|
24
25
|
|
|
25
26
|
---
|
|
26
27
|
|
|
27
28
|
<details open>
|
|
28
|
-
<summary><b>
|
|
29
|
+
<summary><b>terms of service warning — read before installing</b></summary>
|
|
29
30
|
|
|
30
31
|
> [!CAUTION]
|
|
31
|
-
>
|
|
32
|
+
> this plugin uses openai's official oauth authentication (the same method as openai's official codex cli) for personal development use with your chatgpt plus/pro subscription.
|
|
32
33
|
>
|
|
33
|
-
> **
|
|
34
|
-
> -
|
|
35
|
-
> -
|
|
34
|
+
> **this plugin is for personal development only:**
|
|
35
|
+
> - not for commercial services, api resale, or multi-user applications
|
|
36
|
+
> - for production use, see [openai platform api](https://platform.openai.com/)
|
|
36
37
|
>
|
|
37
|
-
> **
|
|
38
|
-
> -
|
|
39
|
-
> -
|
|
40
|
-
> -
|
|
38
|
+
> **by using this plugin, you acknowledge:**
|
|
39
|
+
> - this is an unofficial tool not endorsed by openai
|
|
40
|
+
> - users are responsible for compliance with [openai's terms of use](https://openai.com/policies/terms-of-use/)
|
|
41
|
+
> - you assume all risks associated with using this plugin
|
|
41
42
|
|
|
42
43
|
</details>
|
|
43
44
|
|
|
44
45
|
---
|
|
45
46
|
|
|
46
|
-
##
|
|
47
|
+
## installation
|
|
47
48
|
|
|
48
49
|
<details open>
|
|
49
|
-
<summary><b>
|
|
50
|
+
<summary><b>for humans</b></summary>
|
|
50
51
|
|
|
51
|
-
**
|
|
52
|
+
**option a: let an llm do it**
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
paste this into any llm agent (claude code, opencode, cursor, etc.):
|
|
54
55
|
|
|
55
56
|
```
|
|
56
57
|
Install the oc-chatgpt-multi-auth plugin and add the OpenAI model definitions to ~/.config/opencode/opencode.json by following: https://raw.githubusercontent.com/ndycode/oc-chatgpt-multi-auth/main/README.md
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
**
|
|
60
|
+
**option b: one-command install**
|
|
60
61
|
|
|
61
62
|
```bash
|
|
62
63
|
npx -y oc-chatgpt-multi-auth@latest
|
|
63
64
|
```
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
this writes the config to `~/.config/opencode/opencode.json`, backs up existing config, and clears the plugin cache.
|
|
66
67
|
|
|
67
|
-
>
|
|
68
|
+
> want legacy config (opencode v1.0.209 and below)? add `--legacy` flag.
|
|
68
69
|
|
|
69
|
-
**
|
|
70
|
+
**option c: manual setup**
|
|
70
71
|
|
|
71
|
-
1. **
|
|
72
|
+
1. **add the plugin** to `~/.config/opencode/opencode.json`:
|
|
72
73
|
|
|
73
74
|
```json
|
|
74
75
|
{
|
|
@@ -76,15 +77,15 @@ This writes the config to `~/.config/opencode/opencode.json`, backs up existing
|
|
|
76
77
|
}
|
|
77
78
|
```
|
|
78
79
|
|
|
79
|
-
2. **
|
|
80
|
+
2. **login** with your chatgpt account:
|
|
80
81
|
|
|
81
82
|
```bash
|
|
82
83
|
opencode auth login
|
|
83
84
|
```
|
|
84
85
|
|
|
85
|
-
3. **
|
|
86
|
+
3. **add models** — copy the [full configuration](#models) below
|
|
86
87
|
|
|
87
|
-
4. **
|
|
88
|
+
4. **use it:**
|
|
88
89
|
|
|
89
90
|
```bash
|
|
90
91
|
opencode run "Hello" --model=openai/gpt-5.2 --variant=medium
|
|
@@ -93,26 +94,26 @@ This writes the config to `~/.config/opencode/opencode.json`, backs up existing
|
|
|
93
94
|
</details>
|
|
94
95
|
|
|
95
96
|
<details>
|
|
96
|
-
<summary><b>
|
|
97
|
+
<summary><b>for llm agents</b></summary>
|
|
97
98
|
|
|
98
|
-
###
|
|
99
|
+
### step-by-step instructions
|
|
99
100
|
|
|
100
|
-
1.
|
|
101
|
+
1. edit the opencode configuration file at `~/.config/opencode/opencode.json`
|
|
101
102
|
|
|
102
|
-
> **
|
|
103
|
+
> **note**: this path works on all platforms. on windows, `~` resolves to your user home directory (e.g., `C:\Users\YourName`).
|
|
103
104
|
|
|
104
|
-
2.
|
|
105
|
+
2. add the plugin to the `plugin` array:
|
|
105
106
|
```json
|
|
106
107
|
{
|
|
107
108
|
"plugin": ["oc-chatgpt-multi-auth@latest"]
|
|
108
109
|
}
|
|
109
110
|
```
|
|
110
111
|
|
|
111
|
-
3.
|
|
112
|
+
3. add the model definitions from the [full models configuration](#full-models-configuration-copy-paste-ready) section
|
|
112
113
|
|
|
113
|
-
4.
|
|
114
|
+
4. set `provider` to `"openai"` and choose a model
|
|
114
115
|
|
|
115
|
-
###
|
|
116
|
+
### verification
|
|
116
117
|
|
|
117
118
|
```bash
|
|
118
119
|
opencode run "Hello" --model=openai/gpt-5.2 --variant=medium
|
|
@@ -122,32 +123,32 @@ opencode run "Hello" --model=openai/gpt-5.2 --variant=medium
|
|
|
122
123
|
|
|
123
124
|
---
|
|
124
125
|
|
|
125
|
-
##
|
|
126
|
+
## models
|
|
126
127
|
|
|
127
|
-
###
|
|
128
|
+
### model reference
|
|
128
129
|
|
|
129
|
-
|
|
|
130
|
+
| model | variants | notes |
|
|
130
131
|
|-------|----------|-------|
|
|
131
|
-
| `gpt-5.2` | none, low, medium, high, xhigh |
|
|
132
|
-
| `gpt-5.2-codex` | low, medium, high, xhigh |
|
|
133
|
-
| `gpt-5.1-codex-max` | low, medium, high, xhigh |
|
|
134
|
-
| `gpt-5.1-codex` | low, medium, high |
|
|
135
|
-
| `gpt-5.1-codex-mini` | medium, high |
|
|
136
|
-
| `gpt-5.1` | none, low, medium, high |
|
|
137
|
-
|
|
138
|
-
**
|
|
132
|
+
| `gpt-5.2` | none, low, medium, high, xhigh | latest gpt-5.2 with reasoning levels |
|
|
133
|
+
| `gpt-5.2-codex` | low, medium, high, xhigh | gpt-5.2 codex for code generation |
|
|
134
|
+
| `gpt-5.1-codex-max` | low, medium, high, xhigh | maximum context codex |
|
|
135
|
+
| `gpt-5.1-codex` | low, medium, high | standard codex |
|
|
136
|
+
| `gpt-5.1-codex-mini` | medium, high | lightweight codex |
|
|
137
|
+
| `gpt-5.1` | none, low, medium, high | gpt-5.1 base model |
|
|
138
|
+
|
|
139
|
+
**using variants:**
|
|
139
140
|
```bash
|
|
140
|
-
#
|
|
141
|
+
# modern opencode (v1.0.210+)
|
|
141
142
|
opencode run "Hello" --model=openai/gpt-5.2 --variant=high
|
|
142
143
|
|
|
143
|
-
#
|
|
144
|
+
# legacy opencode (v1.0.209 and below)
|
|
144
145
|
opencode run "Hello" --model=openai/gpt-5.2-high
|
|
145
146
|
```
|
|
146
147
|
|
|
147
148
|
<details>
|
|
148
|
-
<summary><b>
|
|
149
|
+
<summary><b>full models configuration (copy-paste ready)</b></summary>
|
|
149
150
|
|
|
150
|
-
|
|
151
|
+
add this to your `~/.config/opencode/opencode.json`:
|
|
151
152
|
|
|
152
153
|
```json
|
|
153
154
|
{
|
|
@@ -233,66 +234,78 @@ Add this to your `~/.config/opencode/opencode.json`:
|
|
|
233
234
|
}
|
|
234
235
|
```
|
|
235
236
|
|
|
236
|
-
|
|
237
|
+
for legacy opencode (v1.0.209 and below), use `config/opencode-legacy.json` which has individual model entries like `gpt-5.2-low`, `gpt-5.2-medium`, etc.
|
|
237
238
|
|
|
238
239
|
</details>
|
|
239
240
|
|
|
240
241
|
---
|
|
241
242
|
|
|
242
|
-
##
|
|
243
|
+
## multi-account setup
|
|
243
244
|
|
|
244
|
-
|
|
245
|
+
add multiple chatgpt accounts for higher combined quotas. the plugin uses **health-aware rotation** with automatic failover and supports up to 20 accounts.
|
|
245
246
|
|
|
246
247
|
```bash
|
|
247
|
-
opencode auth login #
|
|
248
|
+
opencode auth login # run again to add more accounts
|
|
248
249
|
```
|
|
249
250
|
|
|
250
|
-
**
|
|
251
|
-
- `openai-accounts` —
|
|
252
|
-
- `openai-accounts-switch` —
|
|
253
|
-
- `openai-accounts-status` —
|
|
251
|
+
**manage accounts:**
|
|
252
|
+
- `openai-accounts` — list all accounts
|
|
253
|
+
- `openai-accounts-switch` — switch active account
|
|
254
|
+
- `openai-accounts-status` — show rate limit status
|
|
255
|
+
- `openai-accounts-remove` — remove an account by index
|
|
256
|
+
- `openai-accounts-health` — check health of all accounts
|
|
257
|
+
- `openai-accounts-refresh` — manually refresh all tokens (new in v4.11.0)
|
|
254
258
|
|
|
255
|
-
**
|
|
256
|
-
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
259
|
-
-
|
|
259
|
+
**how rotation works:**
|
|
260
|
+
- health scoring tracks success/failure per account
|
|
261
|
+
- token bucket prevents hitting rate limits
|
|
262
|
+
- hybrid selection prefers healthy accounts with available tokens
|
|
263
|
+
- always retries when all accounts are rate-limited (waits for reset with live countdown)
|
|
264
|
+
- 20% jitter on retry delays to avoid thundering herd
|
|
265
|
+
- auto-removes accounts after 3 consecutive auth failures (new in v4.11.0)
|
|
260
266
|
|
|
261
|
-
**
|
|
267
|
+
**per-project accounts (v4.10.0+):**
|
|
268
|
+
|
|
269
|
+
by default, each project directory gets its own account storage. this means you can have different active accounts per project. works from subdirectories too — the plugin walks up to find the project root (v4.11.0). disable with `perProjectAccounts: false` in your config.
|
|
270
|
+
|
|
271
|
+
**storage locations:**
|
|
272
|
+
- per-project: `{project-root}/.opencode/openai-codex-accounts.json`
|
|
273
|
+
- global (when per-project disabled): `~/.opencode/openai-codex-accounts.json`
|
|
262
274
|
|
|
263
275
|
---
|
|
264
276
|
|
|
265
|
-
##
|
|
277
|
+
## troubleshooting
|
|
266
278
|
|
|
267
|
-
> **
|
|
279
|
+
> **quick reset**: most issues can be resolved by deleting `~/.opencode/auth/openai.json` and running `opencode auth login` again.
|
|
268
280
|
|
|
269
|
-
###
|
|
281
|
+
### configuration paths (all platforms)
|
|
270
282
|
|
|
271
|
-
|
|
283
|
+
opencode uses `~/.config/opencode/` on **all platforms** including windows.
|
|
272
284
|
|
|
273
|
-
|
|
|
285
|
+
| file | path |
|
|
274
286
|
|------|------|
|
|
275
|
-
|
|
|
276
|
-
|
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
|
287
|
+
| main config | `~/.config/opencode/opencode.json` |
|
|
288
|
+
| auth tokens | `~/.opencode/auth/openai.json` |
|
|
289
|
+
| multi-account (global) | `~/.opencode/openai-codex-accounts.json` |
|
|
290
|
+
| multi-account (per-project) | `{project}/.opencode/openai-codex-accounts.json` |
|
|
291
|
+
| plugin config | `~/.opencode/openai-codex-auth-config.json` |
|
|
292
|
+
| debug logs | `~/.opencode/logs/codex-plugin/` |
|
|
280
293
|
|
|
281
|
-
> **
|
|
294
|
+
> **windows users**: `~` resolves to your user home directory (e.g., `C:\Users\YourName`).
|
|
282
295
|
|
|
283
296
|
---
|
|
284
297
|
|
|
285
298
|
<details>
|
|
286
|
-
<summary><b>401
|
|
299
|
+
<summary><b>401 unauthorized error</b></summary>
|
|
287
300
|
|
|
288
|
-
**
|
|
301
|
+
**cause:** token expired or not authenticated.
|
|
289
302
|
|
|
290
|
-
**
|
|
291
|
-
1.
|
|
303
|
+
**solutions:**
|
|
304
|
+
1. re-authenticate:
|
|
292
305
|
```bash
|
|
293
306
|
opencode auth login
|
|
294
307
|
```
|
|
295
|
-
2.
|
|
308
|
+
2. check auth file exists:
|
|
296
309
|
```bash
|
|
297
310
|
cat ~/.opencode/auth/openai.json
|
|
298
311
|
```
|
|
@@ -300,45 +313,45 @@ OpenCode uses `~/.config/opencode/` on **all platforms** including Windows.
|
|
|
300
313
|
</details>
|
|
301
314
|
|
|
302
315
|
<details>
|
|
303
|
-
<summary><b>
|
|
316
|
+
<summary><b>browser doesn't open for oauth</b></summary>
|
|
304
317
|
|
|
305
|
-
**
|
|
318
|
+
**cause:** port 1455 conflict or ssh/wsl environment.
|
|
306
319
|
|
|
307
|
-
**
|
|
308
|
-
1. **
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
320
|
+
**solutions:**
|
|
321
|
+
1. **manual url paste:**
|
|
322
|
+
- re-run `opencode auth login`
|
|
323
|
+
- select **"chatgpt plus/pro (manual url paste)"**
|
|
324
|
+
- paste the full redirect url (including `#code=...`) after login
|
|
312
325
|
|
|
313
|
-
2. **
|
|
326
|
+
2. **check port availability:**
|
|
314
327
|
```bash
|
|
315
|
-
#
|
|
328
|
+
# macos/linux
|
|
316
329
|
lsof -i :1455
|
|
317
330
|
|
|
318
|
-
#
|
|
331
|
+
# windows
|
|
319
332
|
netstat -ano | findstr :1455
|
|
320
333
|
```
|
|
321
334
|
|
|
322
|
-
3. **
|
|
335
|
+
3. **stop codex cli if running** — both use port 1455
|
|
323
336
|
|
|
324
337
|
</details>
|
|
325
338
|
|
|
326
339
|
<details>
|
|
327
|
-
<summary><b>
|
|
340
|
+
<summary><b>model not found</b></summary>
|
|
328
341
|
|
|
329
|
-
**
|
|
342
|
+
**cause:** missing provider prefix or config mismatch.
|
|
330
343
|
|
|
331
|
-
**
|
|
332
|
-
1.
|
|
344
|
+
**solutions:**
|
|
345
|
+
1. use `openai/` prefix:
|
|
333
346
|
```bash
|
|
334
|
-
#
|
|
347
|
+
# correct
|
|
335
348
|
--model=openai/gpt-5.2
|
|
336
349
|
|
|
337
|
-
#
|
|
350
|
+
# wrong
|
|
338
351
|
--model=gpt-5.2
|
|
339
352
|
```
|
|
340
353
|
|
|
341
|
-
2.
|
|
354
|
+
2. verify model is in your config:
|
|
342
355
|
```json
|
|
343
356
|
{ "models": { "gpt-5.2": { ... } } }
|
|
344
357
|
```
|
|
@@ -346,28 +359,28 @@ OpenCode uses `~/.config/opencode/` on **all platforms** including Windows.
|
|
|
346
359
|
</details>
|
|
347
360
|
|
|
348
361
|
<details>
|
|
349
|
-
<summary><b>
|
|
362
|
+
<summary><b>rate limit exceeded</b></summary>
|
|
350
363
|
|
|
351
|
-
**
|
|
364
|
+
**cause:** chatgpt subscription usage limit reached.
|
|
352
365
|
|
|
353
|
-
**
|
|
354
|
-
1.
|
|
355
|
-
2.
|
|
356
|
-
3.
|
|
366
|
+
**solutions:**
|
|
367
|
+
1. wait for reset (plugin shows timing in error message)
|
|
368
|
+
2. add more accounts: `opencode auth login`
|
|
369
|
+
3. switch to a different model family
|
|
357
370
|
|
|
358
371
|
</details>
|
|
359
372
|
|
|
360
373
|
<details>
|
|
361
|
-
<summary><b>
|
|
374
|
+
<summary><b>multi-turn context lost</b></summary>
|
|
362
375
|
|
|
363
|
-
**
|
|
376
|
+
**cause:** old plugin version or missing config.
|
|
364
377
|
|
|
365
|
-
**
|
|
366
|
-
1.
|
|
378
|
+
**solutions:**
|
|
379
|
+
1. update plugin:
|
|
367
380
|
```bash
|
|
368
|
-
npx -y oc-chatgpt-multi-auth@latest
|
|
381
|
+
npx -y oc-chatgpt-multi-auth@latest
|
|
369
382
|
```
|
|
370
|
-
2.
|
|
383
|
+
2. ensure config has:
|
|
371
384
|
```json
|
|
372
385
|
{
|
|
373
386
|
"include": ["reasoning.encrypted_content"],
|
|
@@ -378,34 +391,34 @@ npx -y oc-chatgpt-multi-auth@latest
|
|
|
378
391
|
</details>
|
|
379
392
|
|
|
380
393
|
<details>
|
|
381
|
-
<summary><b>
|
|
394
|
+
<summary><b>oauth callback issues (safari/wsl/docker)</b></summary>
|
|
382
395
|
|
|
383
|
-
**
|
|
384
|
-
-
|
|
385
|
-
-
|
|
396
|
+
**safari https-only mode:**
|
|
397
|
+
- use chrome or firefox instead, or
|
|
398
|
+
- temporarily disable safari > settings > privacy > "enable https-only mode"
|
|
386
399
|
|
|
387
|
-
**
|
|
388
|
-
-
|
|
389
|
-
-
|
|
400
|
+
**wsl2:**
|
|
401
|
+
- use vs code's port forwarding, or
|
|
402
|
+
- configure windows → wsl port forwarding
|
|
390
403
|
|
|
391
|
-
**
|
|
404
|
+
**ssh / remote:**
|
|
392
405
|
```bash
|
|
393
406
|
ssh -L 1455:localhost:1455 user@remote
|
|
394
407
|
```
|
|
395
408
|
|
|
396
|
-
**
|
|
397
|
-
-
|
|
398
|
-
-
|
|
409
|
+
**docker / containers:**
|
|
410
|
+
- oauth with localhost redirect doesn't work in containers
|
|
411
|
+
- use ssh port forwarding or manual url flow
|
|
399
412
|
|
|
400
413
|
</details>
|
|
401
414
|
|
|
402
415
|
---
|
|
403
416
|
|
|
404
|
-
##
|
|
417
|
+
## plugin compatibility
|
|
405
418
|
|
|
406
419
|
### oh-my-opencode
|
|
407
420
|
|
|
408
|
-
|
|
421
|
+
works alongside oh-my-opencode. no special configuration needed.
|
|
409
422
|
|
|
410
423
|
```json
|
|
411
424
|
{
|
|
@@ -418,7 +431,7 @@ Works alongside oh-my-opencode. No special configuration needed.
|
|
|
418
431
|
|
|
419
432
|
### @tarquinen/opencode-dcp
|
|
420
433
|
|
|
421
|
-
|
|
434
|
+
list this plugin before dcp:
|
|
422
435
|
|
|
423
436
|
```json
|
|
424
437
|
{
|
|
@@ -429,81 +442,88 @@ List this plugin BEFORE DCP:
|
|
|
429
442
|
}
|
|
430
443
|
```
|
|
431
444
|
|
|
432
|
-
###
|
|
445
|
+
### plugins you don't need
|
|
433
446
|
|
|
434
|
-
- **openai-codex-auth** —
|
|
447
|
+
- **openai-codex-auth** — not needed. this plugin replaces the original.
|
|
435
448
|
|
|
436
449
|
---
|
|
437
450
|
|
|
438
|
-
##
|
|
451
|
+
## configuration
|
|
439
452
|
|
|
440
|
-
|
|
453
|
+
create `~/.opencode/openai-codex-auth-config.json` for optional settings:
|
|
454
|
+
|
|
455
|
+
### model behavior
|
|
456
|
+
|
|
457
|
+
| option | default | what it does |
|
|
458
|
+
|--------|---------|--------------|
|
|
459
|
+
| `codexMode` | `true` | uses codex-opencode bridge prompt (synced with latest codex cli) |
|
|
441
460
|
|
|
442
|
-
###
|
|
461
|
+
### account settings (v4.10.0+)
|
|
443
462
|
|
|
444
|
-
|
|
|
463
|
+
| option | default | what it does |
|
|
445
464
|
|--------|---------|--------------|
|
|
446
|
-
| `
|
|
465
|
+
| `perProjectAccounts` | `true` | each project gets its own account storage |
|
|
466
|
+
| `toastDurationMs` | `5000` | how long toast notifications stay visible (ms) |
|
|
447
467
|
|
|
448
|
-
###
|
|
468
|
+
### retry behavior
|
|
449
469
|
|
|
450
|
-
|
|
|
470
|
+
| option | default | what it does |
|
|
451
471
|
|--------|---------|--------------|
|
|
452
|
-
| `retryAllAccountsRateLimited` | `true` |
|
|
453
|
-
| `retryAllAccountsMaxWaitMs` | `0` |
|
|
454
|
-
| `retryAllAccountsMaxRetries` | `Infinity` |
|
|
472
|
+
| `retryAllAccountsRateLimited` | `true` | wait and retry when all accounts are rate-limited |
|
|
473
|
+
| `retryAllAccountsMaxWaitMs` | `0` | max wait time (0 = unlimited) |
|
|
474
|
+
| `retryAllAccountsMaxRetries` | `Infinity` | max retry attempts |
|
|
455
475
|
|
|
456
|
-
###
|
|
476
|
+
### environment variables
|
|
457
477
|
|
|
458
478
|
```bash
|
|
459
|
-
DEBUG_CODEX_PLUGIN=1 opencode #
|
|
460
|
-
ENABLE_PLUGIN_REQUEST_LOGGING=1 opencode #
|
|
461
|
-
CODEX_PLUGIN_LOG_LEVEL=debug opencode #
|
|
462
|
-
CODEX_MODE=0 opencode #
|
|
479
|
+
DEBUG_CODEX_PLUGIN=1 opencode # enable debug logging
|
|
480
|
+
ENABLE_PLUGIN_REQUEST_LOGGING=1 opencode # log all api requests
|
|
481
|
+
CODEX_PLUGIN_LOG_LEVEL=debug opencode # set log level (debug|info|warn|error)
|
|
482
|
+
CODEX_MODE=0 opencode # temporarily disable bridge prompt
|
|
463
483
|
```
|
|
464
484
|
|
|
465
|
-
|
|
485
|
+
for all options, see [docs/configuration.md](docs/configuration.md).
|
|
466
486
|
|
|
467
487
|
---
|
|
468
488
|
|
|
469
|
-
##
|
|
489
|
+
## documentation
|
|
470
490
|
|
|
471
|
-
- [
|
|
472
|
-
- [
|
|
473
|
-
- [
|
|
474
|
-
- [
|
|
491
|
+
- [getting started](docs/getting-started.md) — complete installation guide
|
|
492
|
+
- [configuration](docs/configuration.md) — all configuration options
|
|
493
|
+
- [troubleshooting](docs/troubleshooting.md) — common issues and fixes
|
|
494
|
+
- [architecture](docs/development/ARCHITECTURE.md) — how the plugin works
|
|
475
495
|
|
|
476
496
|
---
|
|
477
497
|
|
|
478
|
-
##
|
|
498
|
+
## credits
|
|
479
499
|
|
|
480
|
-
- [numman-ali/opencode-openai-codex-auth](https://github.com/numman-ali/opencode-openai-codex-auth) by [numman-ali](https://github.com/numman-ali) —
|
|
481
|
-
- [ndycode](https://github.com/ndycode) —
|
|
500
|
+
- [numman-ali/opencode-openai-codex-auth](https://github.com/numman-ali/opencode-openai-codex-auth) by [numman-ali](https://github.com/numman-ali) — original plugin
|
|
501
|
+
- [ndycode](https://github.com/ndycode) — multi-account support and maintenance
|
|
482
502
|
|
|
483
|
-
##
|
|
503
|
+
## license
|
|
484
504
|
|
|
485
|
-
|
|
505
|
+
mit license. see [LICENSE](LICENSE) for details.
|
|
486
506
|
|
|
487
507
|
<details>
|
|
488
|
-
<summary><b>
|
|
508
|
+
<summary><b>legal</b></summary>
|
|
489
509
|
|
|
490
|
-
###
|
|
510
|
+
### intended use
|
|
491
511
|
|
|
492
|
-
-
|
|
493
|
-
-
|
|
494
|
-
-
|
|
512
|
+
- personal / internal development only
|
|
513
|
+
- respect subscription quotas and data handling policies
|
|
514
|
+
- not for production services or bypassing intended limits
|
|
495
515
|
|
|
496
|
-
###
|
|
516
|
+
### warning
|
|
497
517
|
|
|
498
|
-
|
|
518
|
+
by using this plugin, you acknowledge:
|
|
499
519
|
|
|
500
|
-
- **
|
|
501
|
-
- **
|
|
502
|
-
- **
|
|
520
|
+
- **terms of service risk** — this approach may violate tos of ai model providers
|
|
521
|
+
- **no guarantees** — apis may change without notice
|
|
522
|
+
- **assumption of risk** — you assume all legal, financial, and technical risks
|
|
503
523
|
|
|
504
|
-
###
|
|
524
|
+
### disclaimer
|
|
505
525
|
|
|
506
|
-
-
|
|
507
|
-
- "
|
|
526
|
+
- not affiliated with openai. this is an independent open-source project.
|
|
527
|
+
- "chatgpt", "gpt-5", "codex", and "openai" are trademarks of openai, l.l.c.
|
|
508
528
|
|
|
509
529
|
</details>
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AA0E/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAy6C/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAoB,CAAC;AAElD,eAAe,iBAAiB,CAAC"}
|