oc-chatgpt-multi-auth 4.9.7 → 4.10.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 +189 -171
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -9
- package/dist/index.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 +1 -1
- package/dist/lib/constants.js +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 +21 -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,76 @@ 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 (new in v4.10.0)
|
|
256
|
+
- `openai-accounts-health` — check health of all accounts
|
|
254
257
|
|
|
255
|
-
**
|
|
256
|
-
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
259
|
-
-
|
|
258
|
+
**how rotation works:**
|
|
259
|
+
- health scoring tracks success/failure per account
|
|
260
|
+
- token bucket prevents hitting rate limits
|
|
261
|
+
- hybrid selection prefers healthy accounts with available tokens
|
|
262
|
+
- always retries when all accounts are rate-limited (waits for reset)
|
|
263
|
+
- 20% jitter on retry delays to avoid thundering herd
|
|
260
264
|
|
|
261
|
-
**
|
|
265
|
+
**per-project accounts (v4.10.0+):**
|
|
266
|
+
|
|
267
|
+
by default, each project directory gets its own account storage. this means you can have different active accounts per project. disable with `perProjectAccounts: false` in your config.
|
|
268
|
+
|
|
269
|
+
**storage locations:**
|
|
270
|
+
- per-project: `{project-root}/.opencode/openai-codex-accounts.json`
|
|
271
|
+
- global (when per-project disabled): `~/.opencode/openai-codex-accounts.json`
|
|
262
272
|
|
|
263
273
|
---
|
|
264
274
|
|
|
265
|
-
##
|
|
275
|
+
## troubleshooting
|
|
266
276
|
|
|
267
|
-
> **
|
|
277
|
+
> **quick reset**: most issues can be resolved by deleting `~/.opencode/auth/openai.json` and running `opencode auth login` again.
|
|
268
278
|
|
|
269
|
-
###
|
|
279
|
+
### configuration paths (all platforms)
|
|
270
280
|
|
|
271
|
-
|
|
281
|
+
opencode uses `~/.config/opencode/` on **all platforms** including windows.
|
|
272
282
|
|
|
273
|
-
|
|
|
283
|
+
| file | path |
|
|
274
284
|
|------|------|
|
|
275
|
-
|
|
|
276
|
-
|
|
|
277
|
-
|
|
|
278
|
-
|
|
|
279
|
-
|
|
|
285
|
+
| main config | `~/.config/opencode/opencode.json` |
|
|
286
|
+
| auth tokens | `~/.opencode/auth/openai.json` |
|
|
287
|
+
| multi-account (global) | `~/.opencode/openai-codex-accounts.json` |
|
|
288
|
+
| multi-account (per-project) | `{project}/.opencode/openai-codex-accounts.json` |
|
|
289
|
+
| plugin config | `~/.opencode/openai-codex-auth-config.json` |
|
|
290
|
+
| debug logs | `~/.opencode/logs/codex-plugin/` |
|
|
280
291
|
|
|
281
|
-
> **
|
|
292
|
+
> **windows users**: `~` resolves to your user home directory (e.g., `C:\Users\YourName`).
|
|
282
293
|
|
|
283
294
|
---
|
|
284
295
|
|
|
285
296
|
<details>
|
|
286
|
-
<summary><b>401
|
|
297
|
+
<summary><b>401 unauthorized error</b></summary>
|
|
287
298
|
|
|
288
|
-
**
|
|
299
|
+
**cause:** token expired or not authenticated.
|
|
289
300
|
|
|
290
|
-
**
|
|
291
|
-
1.
|
|
301
|
+
**solutions:**
|
|
302
|
+
1. re-authenticate:
|
|
292
303
|
```bash
|
|
293
304
|
opencode auth login
|
|
294
305
|
```
|
|
295
|
-
2.
|
|
306
|
+
2. check auth file exists:
|
|
296
307
|
```bash
|
|
297
308
|
cat ~/.opencode/auth/openai.json
|
|
298
309
|
```
|
|
@@ -300,45 +311,45 @@ OpenCode uses `~/.config/opencode/` on **all platforms** including Windows.
|
|
|
300
311
|
</details>
|
|
301
312
|
|
|
302
313
|
<details>
|
|
303
|
-
<summary><b>
|
|
314
|
+
<summary><b>browser doesn't open for oauth</b></summary>
|
|
304
315
|
|
|
305
|
-
**
|
|
316
|
+
**cause:** port 1455 conflict or ssh/wsl environment.
|
|
306
317
|
|
|
307
|
-
**
|
|
308
|
-
1. **
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
318
|
+
**solutions:**
|
|
319
|
+
1. **manual url paste:**
|
|
320
|
+
- re-run `opencode auth login`
|
|
321
|
+
- select **"chatgpt plus/pro (manual url paste)"**
|
|
322
|
+
- paste the full redirect url (including `#code=...`) after login
|
|
312
323
|
|
|
313
|
-
2. **
|
|
324
|
+
2. **check port availability:**
|
|
314
325
|
```bash
|
|
315
|
-
#
|
|
326
|
+
# macos/linux
|
|
316
327
|
lsof -i :1455
|
|
317
328
|
|
|
318
|
-
#
|
|
329
|
+
# windows
|
|
319
330
|
netstat -ano | findstr :1455
|
|
320
331
|
```
|
|
321
332
|
|
|
322
|
-
3. **
|
|
333
|
+
3. **stop codex cli if running** — both use port 1455
|
|
323
334
|
|
|
324
335
|
</details>
|
|
325
336
|
|
|
326
337
|
<details>
|
|
327
|
-
<summary><b>
|
|
338
|
+
<summary><b>model not found</b></summary>
|
|
328
339
|
|
|
329
|
-
**
|
|
340
|
+
**cause:** missing provider prefix or config mismatch.
|
|
330
341
|
|
|
331
|
-
**
|
|
332
|
-
1.
|
|
342
|
+
**solutions:**
|
|
343
|
+
1. use `openai/` prefix:
|
|
333
344
|
```bash
|
|
334
|
-
#
|
|
345
|
+
# correct
|
|
335
346
|
--model=openai/gpt-5.2
|
|
336
347
|
|
|
337
|
-
#
|
|
348
|
+
# wrong
|
|
338
349
|
--model=gpt-5.2
|
|
339
350
|
```
|
|
340
351
|
|
|
341
|
-
2.
|
|
352
|
+
2. verify model is in your config:
|
|
342
353
|
```json
|
|
343
354
|
{ "models": { "gpt-5.2": { ... } } }
|
|
344
355
|
```
|
|
@@ -346,28 +357,28 @@ OpenCode uses `~/.config/opencode/` on **all platforms** including Windows.
|
|
|
346
357
|
</details>
|
|
347
358
|
|
|
348
359
|
<details>
|
|
349
|
-
<summary><b>
|
|
360
|
+
<summary><b>rate limit exceeded</b></summary>
|
|
350
361
|
|
|
351
|
-
**
|
|
362
|
+
**cause:** chatgpt subscription usage limit reached.
|
|
352
363
|
|
|
353
|
-
**
|
|
354
|
-
1.
|
|
355
|
-
2.
|
|
356
|
-
3.
|
|
364
|
+
**solutions:**
|
|
365
|
+
1. wait for reset (plugin shows timing in error message)
|
|
366
|
+
2. add more accounts: `opencode auth login`
|
|
367
|
+
3. switch to a different model family
|
|
357
368
|
|
|
358
369
|
</details>
|
|
359
370
|
|
|
360
371
|
<details>
|
|
361
|
-
<summary><b>
|
|
372
|
+
<summary><b>multi-turn context lost</b></summary>
|
|
362
373
|
|
|
363
|
-
**
|
|
374
|
+
**cause:** old plugin version or missing config.
|
|
364
375
|
|
|
365
|
-
**
|
|
366
|
-
1.
|
|
376
|
+
**solutions:**
|
|
377
|
+
1. update plugin:
|
|
367
378
|
```bash
|
|
368
|
-
npx -y oc-chatgpt-multi-auth@latest
|
|
379
|
+
npx -y oc-chatgpt-multi-auth@latest
|
|
369
380
|
```
|
|
370
|
-
2.
|
|
381
|
+
2. ensure config has:
|
|
371
382
|
```json
|
|
372
383
|
{
|
|
373
384
|
"include": ["reasoning.encrypted_content"],
|
|
@@ -378,34 +389,34 @@ npx -y oc-chatgpt-multi-auth@latest
|
|
|
378
389
|
</details>
|
|
379
390
|
|
|
380
391
|
<details>
|
|
381
|
-
<summary><b>
|
|
392
|
+
<summary><b>oauth callback issues (safari/wsl/docker)</b></summary>
|
|
382
393
|
|
|
383
|
-
**
|
|
384
|
-
-
|
|
385
|
-
-
|
|
394
|
+
**safari https-only mode:**
|
|
395
|
+
- use chrome or firefox instead, or
|
|
396
|
+
- temporarily disable safari > settings > privacy > "enable https-only mode"
|
|
386
397
|
|
|
387
|
-
**
|
|
388
|
-
-
|
|
389
|
-
-
|
|
398
|
+
**wsl2:**
|
|
399
|
+
- use vs code's port forwarding, or
|
|
400
|
+
- configure windows → wsl port forwarding
|
|
390
401
|
|
|
391
|
-
**
|
|
402
|
+
**ssh / remote:**
|
|
392
403
|
```bash
|
|
393
404
|
ssh -L 1455:localhost:1455 user@remote
|
|
394
405
|
```
|
|
395
406
|
|
|
396
|
-
**
|
|
397
|
-
-
|
|
398
|
-
-
|
|
407
|
+
**docker / containers:**
|
|
408
|
+
- oauth with localhost redirect doesn't work in containers
|
|
409
|
+
- use ssh port forwarding or manual url flow
|
|
399
410
|
|
|
400
411
|
</details>
|
|
401
412
|
|
|
402
413
|
---
|
|
403
414
|
|
|
404
|
-
##
|
|
415
|
+
## plugin compatibility
|
|
405
416
|
|
|
406
417
|
### oh-my-opencode
|
|
407
418
|
|
|
408
|
-
|
|
419
|
+
works alongside oh-my-opencode. no special configuration needed.
|
|
409
420
|
|
|
410
421
|
```json
|
|
411
422
|
{
|
|
@@ -418,7 +429,7 @@ Works alongside oh-my-opencode. No special configuration needed.
|
|
|
418
429
|
|
|
419
430
|
### @tarquinen/opencode-dcp
|
|
420
431
|
|
|
421
|
-
|
|
432
|
+
list this plugin before dcp:
|
|
422
433
|
|
|
423
434
|
```json
|
|
424
435
|
{
|
|
@@ -429,81 +440,88 @@ List this plugin BEFORE DCP:
|
|
|
429
440
|
}
|
|
430
441
|
```
|
|
431
442
|
|
|
432
|
-
###
|
|
443
|
+
### plugins you don't need
|
|
433
444
|
|
|
434
|
-
- **openai-codex-auth** —
|
|
445
|
+
- **openai-codex-auth** — not needed. this plugin replaces the original.
|
|
435
446
|
|
|
436
447
|
---
|
|
437
448
|
|
|
438
|
-
##
|
|
449
|
+
## configuration
|
|
439
450
|
|
|
440
|
-
|
|
451
|
+
create `~/.opencode/openai-codex-auth-config.json` for optional settings:
|
|
452
|
+
|
|
453
|
+
### model behavior
|
|
454
|
+
|
|
455
|
+
| option | default | what it does |
|
|
456
|
+
|--------|---------|--------------|
|
|
457
|
+
| `codexMode` | `true` | uses codex-opencode bridge prompt (synced with latest codex cli) |
|
|
441
458
|
|
|
442
|
-
###
|
|
459
|
+
### account settings (v4.10.0+)
|
|
443
460
|
|
|
444
|
-
|
|
|
461
|
+
| option | default | what it does |
|
|
445
462
|
|--------|---------|--------------|
|
|
446
|
-
| `
|
|
463
|
+
| `perProjectAccounts` | `true` | each project gets its own account storage |
|
|
464
|
+
| `toastDurationMs` | `5000` | how long toast notifications stay visible (ms) |
|
|
447
465
|
|
|
448
|
-
###
|
|
466
|
+
### retry behavior
|
|
449
467
|
|
|
450
|
-
|
|
|
468
|
+
| option | default | what it does |
|
|
451
469
|
|--------|---------|--------------|
|
|
452
|
-
| `retryAllAccountsRateLimited` | `true` |
|
|
453
|
-
| `retryAllAccountsMaxWaitMs` | `0` |
|
|
454
|
-
| `retryAllAccountsMaxRetries` | `Infinity` |
|
|
470
|
+
| `retryAllAccountsRateLimited` | `true` | wait and retry when all accounts are rate-limited |
|
|
471
|
+
| `retryAllAccountsMaxWaitMs` | `0` | max wait time (0 = unlimited) |
|
|
472
|
+
| `retryAllAccountsMaxRetries` | `Infinity` | max retry attempts |
|
|
455
473
|
|
|
456
|
-
###
|
|
474
|
+
### environment variables
|
|
457
475
|
|
|
458
476
|
```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 #
|
|
477
|
+
DEBUG_CODEX_PLUGIN=1 opencode # enable debug logging
|
|
478
|
+
ENABLE_PLUGIN_REQUEST_LOGGING=1 opencode # log all api requests
|
|
479
|
+
CODEX_PLUGIN_LOG_LEVEL=debug opencode # set log level (debug|info|warn|error)
|
|
480
|
+
CODEX_MODE=0 opencode # temporarily disable bridge prompt
|
|
463
481
|
```
|
|
464
482
|
|
|
465
|
-
|
|
483
|
+
for all options, see [docs/configuration.md](docs/configuration.md).
|
|
466
484
|
|
|
467
485
|
---
|
|
468
486
|
|
|
469
|
-
##
|
|
487
|
+
## documentation
|
|
470
488
|
|
|
471
|
-
- [
|
|
472
|
-
- [
|
|
473
|
-
- [
|
|
474
|
-
- [
|
|
489
|
+
- [getting started](docs/getting-started.md) — complete installation guide
|
|
490
|
+
- [configuration](docs/configuration.md) — all configuration options
|
|
491
|
+
- [troubleshooting](docs/troubleshooting.md) — common issues and fixes
|
|
492
|
+
- [architecture](docs/development/ARCHITECTURE.md) — how the plugin works
|
|
475
493
|
|
|
476
494
|
---
|
|
477
495
|
|
|
478
|
-
##
|
|
496
|
+
## credits
|
|
479
497
|
|
|
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) —
|
|
498
|
+
- [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
|
|
499
|
+
- [ndycode](https://github.com/ndycode) — multi-account support and maintenance
|
|
482
500
|
|
|
483
|
-
##
|
|
501
|
+
## license
|
|
484
502
|
|
|
485
|
-
|
|
503
|
+
mit license. see [LICENSE](LICENSE) for details.
|
|
486
504
|
|
|
487
505
|
<details>
|
|
488
|
-
<summary><b>
|
|
506
|
+
<summary><b>legal</b></summary>
|
|
489
507
|
|
|
490
|
-
###
|
|
508
|
+
### intended use
|
|
491
509
|
|
|
492
|
-
-
|
|
493
|
-
-
|
|
494
|
-
-
|
|
510
|
+
- personal / internal development only
|
|
511
|
+
- respect subscription quotas and data handling policies
|
|
512
|
+
- not for production services or bypassing intended limits
|
|
495
513
|
|
|
496
|
-
###
|
|
514
|
+
### warning
|
|
497
515
|
|
|
498
|
-
|
|
516
|
+
by using this plugin, you acknowledge:
|
|
499
517
|
|
|
500
|
-
- **
|
|
501
|
-
- **
|
|
502
|
-
- **
|
|
518
|
+
- **terms of service risk** — this approach may violate tos of ai model providers
|
|
519
|
+
- **no guarantees** — apis may change without notice
|
|
520
|
+
- **assumption of risk** — you assume all legal, financial, and technical risks
|
|
503
521
|
|
|
504
|
-
###
|
|
522
|
+
### disclaimer
|
|
505
523
|
|
|
506
|
-
-
|
|
507
|
-
- "
|
|
524
|
+
- not affiliated with openai. this is an independent open-source project.
|
|
525
|
+
- "chatgpt", "gpt-5", "codex", and "openai" are trademarks of openai, l.l.c.
|
|
508
526
|
|
|
509
527
|
</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,MAm1C/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAoB,CAAC;AAElD,eAAe,iBAAiB,CAAC"}
|