opencode-openai-codex-multi-auth 4.4.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.
Files changed (90) hide show
  1. package/LICENSE +37 -0
  2. package/README.md +89 -0
  3. package/assets/openai-codex-auth-config.schema.json +63 -0
  4. package/assets/opencode-logo-ornate-dark.svg +18 -0
  5. package/assets/readme-hero.svg +31 -0
  6. package/config/README.md +103 -0
  7. package/config/minimal-opencode.json +12 -0
  8. package/config/opencode-legacy.json +571 -0
  9. package/config/opencode-modern.json +239 -0
  10. package/dist/index.d.ts +42 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +564 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/lib/accounts.d.ts +58 -0
  15. package/dist/lib/accounts.d.ts.map +1 -0
  16. package/dist/lib/accounts.js +405 -0
  17. package/dist/lib/accounts.js.map +1 -0
  18. package/dist/lib/auth/auth.d.ts +43 -0
  19. package/dist/lib/auth/auth.d.ts.map +1 -0
  20. package/dist/lib/auth/auth.js +163 -0
  21. package/dist/lib/auth/auth.js.map +1 -0
  22. package/dist/lib/auth/browser.d.ts +17 -0
  23. package/dist/lib/auth/browser.d.ts.map +1 -0
  24. package/dist/lib/auth/browser.js +76 -0
  25. package/dist/lib/auth/browser.js.map +1 -0
  26. package/dist/lib/auth/server.d.ts +10 -0
  27. package/dist/lib/auth/server.d.ts.map +1 -0
  28. package/dist/lib/auth/server.js +78 -0
  29. package/dist/lib/auth/server.js.map +1 -0
  30. package/dist/lib/cli.d.ts +8 -0
  31. package/dist/lib/cli.d.ts.map +1 -0
  32. package/dist/lib/cli.js +36 -0
  33. package/dist/lib/cli.js.map +1 -0
  34. package/dist/lib/config.d.ts +25 -0
  35. package/dist/lib/config.d.ts.map +1 -0
  36. package/dist/lib/config.js +112 -0
  37. package/dist/lib/config.js.map +1 -0
  38. package/dist/lib/constants.d.ts +67 -0
  39. package/dist/lib/constants.d.ts.map +1 -0
  40. package/dist/lib/constants.js +67 -0
  41. package/dist/lib/constants.js.map +1 -0
  42. package/dist/lib/logger.d.ts +21 -0
  43. package/dist/lib/logger.d.ts.map +1 -0
  44. package/dist/lib/logger.js +77 -0
  45. package/dist/lib/logger.js.map +1 -0
  46. package/dist/lib/oauth-success.html +712 -0
  47. package/dist/lib/prompts/codex-opencode-bridge.d.ts +19 -0
  48. package/dist/lib/prompts/codex-opencode-bridge.d.ts.map +1 -0
  49. package/dist/lib/prompts/codex-opencode-bridge.js +152 -0
  50. package/dist/lib/prompts/codex-opencode-bridge.js.map +1 -0
  51. package/dist/lib/prompts/codex.d.ts +28 -0
  52. package/dist/lib/prompts/codex.d.ts.map +1 -0
  53. package/dist/lib/prompts/codex.js +248 -0
  54. package/dist/lib/prompts/codex.js.map +1 -0
  55. package/dist/lib/prompts/opencode-codex.d.ts +21 -0
  56. package/dist/lib/prompts/opencode-codex.d.ts.map +1 -0
  57. package/dist/lib/prompts/opencode-codex.js +91 -0
  58. package/dist/lib/prompts/opencode-codex.js.map +1 -0
  59. package/dist/lib/request/fetch-helpers.d.ts +73 -0
  60. package/dist/lib/request/fetch-helpers.d.ts.map +1 -0
  61. package/dist/lib/request/fetch-helpers.js +221 -0
  62. package/dist/lib/request/fetch-helpers.js.map +1 -0
  63. package/dist/lib/request/helpers/input-utils.d.ts +6 -0
  64. package/dist/lib/request/helpers/input-utils.d.ts.map +1 -0
  65. package/dist/lib/request/helpers/input-utils.js +174 -0
  66. package/dist/lib/request/helpers/input-utils.js.map +1 -0
  67. package/dist/lib/request/helpers/model-map.d.ts +28 -0
  68. package/dist/lib/request/helpers/model-map.d.ts.map +1 -0
  69. package/dist/lib/request/helpers/model-map.js +109 -0
  70. package/dist/lib/request/helpers/model-map.js.map +1 -0
  71. package/dist/lib/request/request-transformer.d.ts +93 -0
  72. package/dist/lib/request/request-transformer.d.ts.map +1 -0
  73. package/dist/lib/request/request-transformer.js +403 -0
  74. package/dist/lib/request/request-transformer.js.map +1 -0
  75. package/dist/lib/request/response-handler.d.ts +14 -0
  76. package/dist/lib/request/response-handler.d.ts.map +1 -0
  77. package/dist/lib/request/response-handler.js +88 -0
  78. package/dist/lib/request/response-handler.js.map +1 -0
  79. package/dist/lib/storage.d.ts +5 -0
  80. package/dist/lib/storage.d.ts.map +1 -0
  81. package/dist/lib/storage.js +46 -0
  82. package/dist/lib/storage.js.map +1 -0
  83. package/dist/lib/types.d.ts +236 -0
  84. package/dist/lib/types.d.ts.map +1 -0
  85. package/dist/lib/types.js +2 -0
  86. package/dist/lib/types.js.map +1 -0
  87. package/package.json +77 -0
  88. package/scripts/install-opencode-codex-auth.js +450 -0
  89. package/scripts/test-all-models.sh +259 -0
  90. package/scripts/validate-model-map.sh +97 -0
@@ -0,0 +1,571 @@
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "plugin": [
4
+ "opencode-openai-codex-multi-auth"
5
+ ],
6
+ "provider": {
7
+ "openai": {
8
+ "options": {
9
+ "reasoningEffort": "medium",
10
+ "reasoningSummary": "auto",
11
+ "textVerbosity": "medium",
12
+ "include": [
13
+ "reasoning.encrypted_content"
14
+ ],
15
+ "store": false
16
+ },
17
+ "models": {
18
+ "gpt-5.2-none": {
19
+ "name": "GPT 5.2 None (OAuth)",
20
+ "limit": {
21
+ "context": 272000,
22
+ "output": 128000
23
+ },
24
+ "modalities": {
25
+ "input": [
26
+ "text",
27
+ "image"
28
+ ],
29
+ "output": [
30
+ "text"
31
+ ]
32
+ },
33
+ "options": {
34
+ "reasoningEffort": "none",
35
+ "reasoningSummary": "auto",
36
+ "textVerbosity": "medium",
37
+ "include": [
38
+ "reasoning.encrypted_content"
39
+ ],
40
+ "store": false
41
+ }
42
+ },
43
+ "gpt-5.2-low": {
44
+ "name": "GPT 5.2 Low (OAuth)",
45
+ "limit": {
46
+ "context": 272000,
47
+ "output": 128000
48
+ },
49
+ "modalities": {
50
+ "input": [
51
+ "text",
52
+ "image"
53
+ ],
54
+ "output": [
55
+ "text"
56
+ ]
57
+ },
58
+ "options": {
59
+ "reasoningEffort": "low",
60
+ "reasoningSummary": "auto",
61
+ "textVerbosity": "medium",
62
+ "include": [
63
+ "reasoning.encrypted_content"
64
+ ],
65
+ "store": false
66
+ }
67
+ },
68
+ "gpt-5.2-medium": {
69
+ "name": "GPT 5.2 Medium (OAuth)",
70
+ "limit": {
71
+ "context": 272000,
72
+ "output": 128000
73
+ },
74
+ "modalities": {
75
+ "input": [
76
+ "text",
77
+ "image"
78
+ ],
79
+ "output": [
80
+ "text"
81
+ ]
82
+ },
83
+ "options": {
84
+ "reasoningEffort": "medium",
85
+ "reasoningSummary": "auto",
86
+ "textVerbosity": "medium",
87
+ "include": [
88
+ "reasoning.encrypted_content"
89
+ ],
90
+ "store": false
91
+ }
92
+ },
93
+ "gpt-5.2-high": {
94
+ "name": "GPT 5.2 High (OAuth)",
95
+ "limit": {
96
+ "context": 272000,
97
+ "output": 128000
98
+ },
99
+ "modalities": {
100
+ "input": [
101
+ "text",
102
+ "image"
103
+ ],
104
+ "output": [
105
+ "text"
106
+ ]
107
+ },
108
+ "options": {
109
+ "reasoningEffort": "high",
110
+ "reasoningSummary": "detailed",
111
+ "textVerbosity": "medium",
112
+ "include": [
113
+ "reasoning.encrypted_content"
114
+ ],
115
+ "store": false
116
+ }
117
+ },
118
+ "gpt-5.2-xhigh": {
119
+ "name": "GPT 5.2 Extra High (OAuth)",
120
+ "limit": {
121
+ "context": 272000,
122
+ "output": 128000
123
+ },
124
+ "modalities": {
125
+ "input": [
126
+ "text",
127
+ "image"
128
+ ],
129
+ "output": [
130
+ "text"
131
+ ]
132
+ },
133
+ "options": {
134
+ "reasoningEffort": "xhigh",
135
+ "reasoningSummary": "detailed",
136
+ "textVerbosity": "medium",
137
+ "include": [
138
+ "reasoning.encrypted_content"
139
+ ],
140
+ "store": false
141
+ }
142
+ },
143
+ "gpt-5.2-codex-low": {
144
+ "name": "GPT 5.2 Codex Low (OAuth)",
145
+ "limit": {
146
+ "context": 272000,
147
+ "output": 128000
148
+ },
149
+ "modalities": {
150
+ "input": [
151
+ "text",
152
+ "image"
153
+ ],
154
+ "output": [
155
+ "text"
156
+ ]
157
+ },
158
+ "options": {
159
+ "reasoningEffort": "low",
160
+ "reasoningSummary": "auto",
161
+ "textVerbosity": "medium",
162
+ "include": [
163
+ "reasoning.encrypted_content"
164
+ ],
165
+ "store": false
166
+ }
167
+ },
168
+ "gpt-5.2-codex-medium": {
169
+ "name": "GPT 5.2 Codex Medium (OAuth)",
170
+ "limit": {
171
+ "context": 272000,
172
+ "output": 128000
173
+ },
174
+ "modalities": {
175
+ "input": [
176
+ "text",
177
+ "image"
178
+ ],
179
+ "output": [
180
+ "text"
181
+ ]
182
+ },
183
+ "options": {
184
+ "reasoningEffort": "medium",
185
+ "reasoningSummary": "auto",
186
+ "textVerbosity": "medium",
187
+ "include": [
188
+ "reasoning.encrypted_content"
189
+ ],
190
+ "store": false
191
+ }
192
+ },
193
+ "gpt-5.2-codex-high": {
194
+ "name": "GPT 5.2 Codex High (OAuth)",
195
+ "limit": {
196
+ "context": 272000,
197
+ "output": 128000
198
+ },
199
+ "modalities": {
200
+ "input": [
201
+ "text",
202
+ "image"
203
+ ],
204
+ "output": [
205
+ "text"
206
+ ]
207
+ },
208
+ "options": {
209
+ "reasoningEffort": "high",
210
+ "reasoningSummary": "detailed",
211
+ "textVerbosity": "medium",
212
+ "include": [
213
+ "reasoning.encrypted_content"
214
+ ],
215
+ "store": false
216
+ }
217
+ },
218
+ "gpt-5.2-codex-xhigh": {
219
+ "name": "GPT 5.2 Codex Extra High (OAuth)",
220
+ "limit": {
221
+ "context": 272000,
222
+ "output": 128000
223
+ },
224
+ "modalities": {
225
+ "input": [
226
+ "text",
227
+ "image"
228
+ ],
229
+ "output": [
230
+ "text"
231
+ ]
232
+ },
233
+ "options": {
234
+ "reasoningEffort": "xhigh",
235
+ "reasoningSummary": "detailed",
236
+ "textVerbosity": "medium",
237
+ "include": [
238
+ "reasoning.encrypted_content"
239
+ ],
240
+ "store": false
241
+ }
242
+ },
243
+ "gpt-5.1-codex-max-low": {
244
+ "name": "GPT 5.1 Codex Max Low (OAuth)",
245
+ "limit": {
246
+ "context": 272000,
247
+ "output": 128000
248
+ },
249
+ "modalities": {
250
+ "input": [
251
+ "text",
252
+ "image"
253
+ ],
254
+ "output": [
255
+ "text"
256
+ ]
257
+ },
258
+ "options": {
259
+ "reasoningEffort": "low",
260
+ "reasoningSummary": "detailed",
261
+ "textVerbosity": "medium",
262
+ "include": [
263
+ "reasoning.encrypted_content"
264
+ ],
265
+ "store": false
266
+ }
267
+ },
268
+ "gpt-5.1-codex-max-medium": {
269
+ "name": "GPT 5.1 Codex Max Medium (OAuth)",
270
+ "limit": {
271
+ "context": 272000,
272
+ "output": 128000
273
+ },
274
+ "modalities": {
275
+ "input": [
276
+ "text",
277
+ "image"
278
+ ],
279
+ "output": [
280
+ "text"
281
+ ]
282
+ },
283
+ "options": {
284
+ "reasoningEffort": "medium",
285
+ "reasoningSummary": "detailed",
286
+ "textVerbosity": "medium",
287
+ "include": [
288
+ "reasoning.encrypted_content"
289
+ ],
290
+ "store": false
291
+ }
292
+ },
293
+ "gpt-5.1-codex-max-high": {
294
+ "name": "GPT 5.1 Codex Max High (OAuth)",
295
+ "limit": {
296
+ "context": 272000,
297
+ "output": 128000
298
+ },
299
+ "modalities": {
300
+ "input": [
301
+ "text",
302
+ "image"
303
+ ],
304
+ "output": [
305
+ "text"
306
+ ]
307
+ },
308
+ "options": {
309
+ "reasoningEffort": "high",
310
+ "reasoningSummary": "detailed",
311
+ "textVerbosity": "medium",
312
+ "include": [
313
+ "reasoning.encrypted_content"
314
+ ],
315
+ "store": false
316
+ }
317
+ },
318
+ "gpt-5.1-codex-max-xhigh": {
319
+ "name": "GPT 5.1 Codex Max Extra High (OAuth)",
320
+ "limit": {
321
+ "context": 272000,
322
+ "output": 128000
323
+ },
324
+ "modalities": {
325
+ "input": [
326
+ "text",
327
+ "image"
328
+ ],
329
+ "output": [
330
+ "text"
331
+ ]
332
+ },
333
+ "options": {
334
+ "reasoningEffort": "xhigh",
335
+ "reasoningSummary": "detailed",
336
+ "textVerbosity": "medium",
337
+ "include": [
338
+ "reasoning.encrypted_content"
339
+ ],
340
+ "store": false
341
+ }
342
+ },
343
+ "gpt-5.1-codex-low": {
344
+ "name": "GPT 5.1 Codex Low (OAuth)",
345
+ "limit": {
346
+ "context": 272000,
347
+ "output": 128000
348
+ },
349
+ "modalities": {
350
+ "input": [
351
+ "text",
352
+ "image"
353
+ ],
354
+ "output": [
355
+ "text"
356
+ ]
357
+ },
358
+ "options": {
359
+ "reasoningEffort": "low",
360
+ "reasoningSummary": "auto",
361
+ "textVerbosity": "medium",
362
+ "include": [
363
+ "reasoning.encrypted_content"
364
+ ],
365
+ "store": false
366
+ }
367
+ },
368
+ "gpt-5.1-codex-medium": {
369
+ "name": "GPT 5.1 Codex Medium (OAuth)",
370
+ "limit": {
371
+ "context": 272000,
372
+ "output": 128000
373
+ },
374
+ "modalities": {
375
+ "input": [
376
+ "text",
377
+ "image"
378
+ ],
379
+ "output": [
380
+ "text"
381
+ ]
382
+ },
383
+ "options": {
384
+ "reasoningEffort": "medium",
385
+ "reasoningSummary": "auto",
386
+ "textVerbosity": "medium",
387
+ "include": [
388
+ "reasoning.encrypted_content"
389
+ ],
390
+ "store": false
391
+ }
392
+ },
393
+ "gpt-5.1-codex-high": {
394
+ "name": "GPT 5.1 Codex High (OAuth)",
395
+ "limit": {
396
+ "context": 272000,
397
+ "output": 128000
398
+ },
399
+ "modalities": {
400
+ "input": [
401
+ "text",
402
+ "image"
403
+ ],
404
+ "output": [
405
+ "text"
406
+ ]
407
+ },
408
+ "options": {
409
+ "reasoningEffort": "high",
410
+ "reasoningSummary": "detailed",
411
+ "textVerbosity": "medium",
412
+ "include": [
413
+ "reasoning.encrypted_content"
414
+ ],
415
+ "store": false
416
+ }
417
+ },
418
+ "gpt-5.1-codex-mini-medium": {
419
+ "name": "GPT 5.1 Codex Mini Medium (OAuth)",
420
+ "limit": {
421
+ "context": 272000,
422
+ "output": 128000
423
+ },
424
+ "modalities": {
425
+ "input": [
426
+ "text",
427
+ "image"
428
+ ],
429
+ "output": [
430
+ "text"
431
+ ]
432
+ },
433
+ "options": {
434
+ "reasoningEffort": "medium",
435
+ "reasoningSummary": "auto",
436
+ "textVerbosity": "medium",
437
+ "include": [
438
+ "reasoning.encrypted_content"
439
+ ],
440
+ "store": false
441
+ }
442
+ },
443
+ "gpt-5.1-codex-mini-high": {
444
+ "name": "GPT 5.1 Codex Mini High (OAuth)",
445
+ "limit": {
446
+ "context": 272000,
447
+ "output": 128000
448
+ },
449
+ "modalities": {
450
+ "input": [
451
+ "text",
452
+ "image"
453
+ ],
454
+ "output": [
455
+ "text"
456
+ ]
457
+ },
458
+ "options": {
459
+ "reasoningEffort": "high",
460
+ "reasoningSummary": "detailed",
461
+ "textVerbosity": "medium",
462
+ "include": [
463
+ "reasoning.encrypted_content"
464
+ ],
465
+ "store": false
466
+ }
467
+ },
468
+ "gpt-5.1-none": {
469
+ "name": "GPT 5.1 None (OAuth)",
470
+ "limit": {
471
+ "context": 272000,
472
+ "output": 128000
473
+ },
474
+ "modalities": {
475
+ "input": [
476
+ "text",
477
+ "image"
478
+ ],
479
+ "output": [
480
+ "text"
481
+ ]
482
+ },
483
+ "options": {
484
+ "reasoningEffort": "none",
485
+ "reasoningSummary": "auto",
486
+ "textVerbosity": "medium",
487
+ "include": [
488
+ "reasoning.encrypted_content"
489
+ ],
490
+ "store": false
491
+ }
492
+ },
493
+ "gpt-5.1-low": {
494
+ "name": "GPT 5.1 Low (OAuth)",
495
+ "limit": {
496
+ "context": 272000,
497
+ "output": 128000
498
+ },
499
+ "modalities": {
500
+ "input": [
501
+ "text",
502
+ "image"
503
+ ],
504
+ "output": [
505
+ "text"
506
+ ]
507
+ },
508
+ "options": {
509
+ "reasoningEffort": "low",
510
+ "reasoningSummary": "auto",
511
+ "textVerbosity": "low",
512
+ "include": [
513
+ "reasoning.encrypted_content"
514
+ ],
515
+ "store": false
516
+ }
517
+ },
518
+ "gpt-5.1-medium": {
519
+ "name": "GPT 5.1 Medium (OAuth)",
520
+ "limit": {
521
+ "context": 272000,
522
+ "output": 128000
523
+ },
524
+ "modalities": {
525
+ "input": [
526
+ "text",
527
+ "image"
528
+ ],
529
+ "output": [
530
+ "text"
531
+ ]
532
+ },
533
+ "options": {
534
+ "reasoningEffort": "medium",
535
+ "reasoningSummary": "auto",
536
+ "textVerbosity": "medium",
537
+ "include": [
538
+ "reasoning.encrypted_content"
539
+ ],
540
+ "store": false
541
+ }
542
+ },
543
+ "gpt-5.1-high": {
544
+ "name": "GPT 5.1 High (OAuth)",
545
+ "limit": {
546
+ "context": 272000,
547
+ "output": 128000
548
+ },
549
+ "modalities": {
550
+ "input": [
551
+ "text",
552
+ "image"
553
+ ],
554
+ "output": [
555
+ "text"
556
+ ]
557
+ },
558
+ "options": {
559
+ "reasoningEffort": "high",
560
+ "reasoningSummary": "detailed",
561
+ "textVerbosity": "high",
562
+ "include": [
563
+ "reasoning.encrypted_content"
564
+ ],
565
+ "store": false
566
+ }
567
+ }
568
+ }
569
+ }
570
+ }
571
+ }