opencode-openai-codex-auth-multi 4.3.0-multiaccount.1 → 4.5.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 (87) hide show
  1. package/LICENSE +37 -37
  2. package/README.md +463 -80
  3. package/assets/opencode-logo-ornate-dark.svg +18 -18
  4. package/assets/readme-hero.svg +31 -31
  5. package/config/README.md +98 -98
  6. package/config/minimal-opencode.json +11 -11
  7. package/config/opencode-legacy.json +568 -568
  8. package/config/opencode-modern.json +236 -236
  9. package/dist/index.d.ts +2 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +391 -135
  12. package/dist/index.js.map +1 -1
  13. package/dist/lib/accounts.d.ts +85 -11
  14. package/dist/lib/accounts.d.ts.map +1 -1
  15. package/dist/lib/accounts.js +352 -62
  16. package/dist/lib/accounts.js.map +1 -1
  17. package/dist/lib/auth/auth.d.ts +9 -1
  18. package/dist/lib/auth/auth.d.ts.map +1 -1
  19. package/dist/lib/auth/auth.js +26 -13
  20. package/dist/lib/auth/auth.js.map +1 -1
  21. package/dist/lib/auth/browser.d.ts.map +1 -1
  22. package/dist/lib/auth/browser.js +9 -2
  23. package/dist/lib/auth/browser.js.map +1 -1
  24. package/dist/lib/auth/server.d.ts.map +1 -1
  25. package/dist/lib/auth/server.js +11 -4
  26. package/dist/lib/auth/server.js.map +1 -1
  27. package/dist/lib/auto-update-checker.d.ts +10 -0
  28. package/dist/lib/auto-update-checker.d.ts.map +1 -0
  29. package/dist/lib/auto-update-checker.js +129 -0
  30. package/dist/lib/auto-update-checker.js.map +1 -0
  31. package/dist/lib/cli.d.ts +1 -0
  32. package/dist/lib/cli.d.ts.map +1 -1
  33. package/dist/lib/cli.js +11 -6
  34. package/dist/lib/cli.js.map +1 -1
  35. package/dist/lib/config.d.ts +5 -7
  36. package/dist/lib/config.d.ts.map +1 -1
  37. package/dist/lib/config.js +49 -6
  38. package/dist/lib/config.js.map +1 -1
  39. package/dist/lib/constants.d.ts +7 -0
  40. package/dist/lib/constants.d.ts.map +1 -1
  41. package/dist/lib/constants.js +7 -0
  42. package/dist/lib/constants.js.map +1 -1
  43. package/dist/lib/index.d.ts +13 -0
  44. package/dist/lib/index.d.ts.map +1 -0
  45. package/dist/lib/index.js +13 -0
  46. package/dist/lib/index.js.map +1 -0
  47. package/dist/lib/logger.d.ts +13 -17
  48. package/dist/lib/logger.d.ts.map +1 -1
  49. package/dist/lib/logger.js +89 -24
  50. package/dist/lib/logger.js.map +1 -1
  51. package/dist/lib/oauth-success.html +712 -712
  52. package/dist/lib/prompts/codex-opencode-bridge.js +121 -121
  53. package/dist/lib/prompts/codex.d.ts +5 -0
  54. package/dist/lib/prompts/codex.d.ts.map +1 -1
  55. package/dist/lib/prompts/codex.js +114 -93
  56. package/dist/lib/prompts/codex.js.map +1 -1
  57. package/dist/lib/refresh-queue.d.ts +100 -0
  58. package/dist/lib/refresh-queue.d.ts.map +1 -0
  59. package/dist/lib/refresh-queue.js +196 -0
  60. package/dist/lib/refresh-queue.js.map +1 -0
  61. package/dist/lib/request/fetch-helpers.d.ts +2 -3
  62. package/dist/lib/request/fetch-helpers.d.ts.map +1 -1
  63. package/dist/lib/request/fetch-helpers.js +26 -29
  64. package/dist/lib/request/fetch-helpers.js.map +1 -1
  65. package/dist/lib/request/rate-limit-backoff.d.ts +17 -0
  66. package/dist/lib/request/rate-limit-backoff.d.ts.map +1 -0
  67. package/dist/lib/request/rate-limit-backoff.js +74 -0
  68. package/dist/lib/request/rate-limit-backoff.js.map +1 -0
  69. package/dist/lib/request/request-transformer.d.ts.map +1 -1
  70. package/dist/lib/request/request-transformer.js +3 -2
  71. package/dist/lib/request/request-transformer.js.map +1 -1
  72. package/dist/lib/request/response-handler.js +1 -1
  73. package/dist/lib/request/response-handler.js.map +1 -1
  74. package/dist/lib/rotation.d.ts +121 -0
  75. package/dist/lib/rotation.d.ts.map +1 -0
  76. package/dist/lib/rotation.js +248 -0
  77. package/dist/lib/rotation.js.map +1 -0
  78. package/dist/lib/storage.d.ts +72 -4
  79. package/dist/lib/storage.d.ts.map +1 -1
  80. package/dist/lib/storage.js +189 -19
  81. package/dist/lib/storage.js.map +1 -1
  82. package/dist/lib/types.d.ts +37 -1
  83. package/dist/lib/types.d.ts.map +1 -1
  84. package/package.json +85 -71
  85. package/scripts/install-opencode-codex-auth.js +191 -191
  86. package/scripts/test-all-models.sh +258 -258
  87. package/scripts/validate-model-map.sh +97 -97
@@ -1,240 +1,240 @@
1
- {
2
- "$schema": "https://opencode.ai/config.json",
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
3
  "plugin": [
4
4
  "opencode-openai-codex-auth-multi"
5
5
  ],
6
6
 
7
- "provider": {
8
- "openai": {
9
- "options": {
10
- "reasoningEffort": "medium",
11
- "reasoningSummary": "auto",
12
- "textVerbosity": "medium",
13
- "include": [
14
- "reasoning.encrypted_content"
15
- ],
16
- "store": false
17
- },
18
- "models": {
19
- "gpt-5.2": {
20
- "name": "GPT 5.2 (OAuth)",
21
- "limit": {
22
- "context": 272000,
23
- "output": 128000
24
- },
25
- "modalities": {
26
- "input": [
27
- "text",
28
- "image"
29
- ],
30
- "output": [
31
- "text"
32
- ]
33
- },
34
- "variants": {
35
- "none": {
36
- "reasoningEffort": "none",
37
- "reasoningSummary": "auto",
38
- "textVerbosity": "medium"
39
- },
40
- "low": {
41
- "reasoningEffort": "low",
42
- "reasoningSummary": "auto",
43
- "textVerbosity": "medium"
44
- },
45
- "medium": {
46
- "reasoningEffort": "medium",
47
- "reasoningSummary": "auto",
48
- "textVerbosity": "medium"
49
- },
50
- "high": {
51
- "reasoningEffort": "high",
52
- "reasoningSummary": "detailed",
53
- "textVerbosity": "medium"
54
- },
55
- "xhigh": {
56
- "reasoningEffort": "xhigh",
57
- "reasoningSummary": "detailed",
58
- "textVerbosity": "medium"
59
- }
60
- }
61
- },
62
- "gpt-5.2-codex": {
63
- "name": "GPT 5.2 Codex (OAuth)",
64
- "limit": {
65
- "context": 272000,
66
- "output": 128000
67
- },
68
- "modalities": {
69
- "input": [
70
- "text",
71
- "image"
72
- ],
73
- "output": [
74
- "text"
75
- ]
76
- },
77
- "variants": {
78
- "low": {
79
- "reasoningEffort": "low",
80
- "reasoningSummary": "auto",
81
- "textVerbosity": "medium"
82
- },
83
- "medium": {
84
- "reasoningEffort": "medium",
85
- "reasoningSummary": "auto",
86
- "textVerbosity": "medium"
87
- },
88
- "high": {
89
- "reasoningEffort": "high",
90
- "reasoningSummary": "detailed",
91
- "textVerbosity": "medium"
92
- },
93
- "xhigh": {
94
- "reasoningEffort": "xhigh",
95
- "reasoningSummary": "detailed",
96
- "textVerbosity": "medium"
97
- }
98
- }
99
- },
100
- "gpt-5.1-codex-max": {
101
- "name": "GPT 5.1 Codex Max (OAuth)",
102
- "limit": {
103
- "context": 272000,
104
- "output": 128000
105
- },
106
- "modalities": {
107
- "input": [
108
- "text",
109
- "image"
110
- ],
111
- "output": [
112
- "text"
113
- ]
114
- },
115
- "variants": {
116
- "low": {
117
- "reasoningEffort": "low",
118
- "reasoningSummary": "detailed",
119
- "textVerbosity": "medium"
120
- },
121
- "medium": {
122
- "reasoningEffort": "medium",
123
- "reasoningSummary": "detailed",
124
- "textVerbosity": "medium"
125
- },
126
- "high": {
127
- "reasoningEffort": "high",
128
- "reasoningSummary": "detailed",
129
- "textVerbosity": "medium"
130
- },
131
- "xhigh": {
132
- "reasoningEffort": "xhigh",
133
- "reasoningSummary": "detailed",
134
- "textVerbosity": "medium"
135
- }
136
- }
137
- },
138
- "gpt-5.1-codex": {
139
- "name": "GPT 5.1 Codex (OAuth)",
140
- "limit": {
141
- "context": 272000,
142
- "output": 128000
143
- },
144
- "modalities": {
145
- "input": [
146
- "text",
147
- "image"
148
- ],
149
- "output": [
150
- "text"
151
- ]
152
- },
153
- "variants": {
154
- "low": {
155
- "reasoningEffort": "low",
156
- "reasoningSummary": "auto",
157
- "textVerbosity": "medium"
158
- },
159
- "medium": {
160
- "reasoningEffort": "medium",
161
- "reasoningSummary": "auto",
162
- "textVerbosity": "medium"
163
- },
164
- "high": {
165
- "reasoningEffort": "high",
166
- "reasoningSummary": "detailed",
167
- "textVerbosity": "medium"
168
- }
169
- }
170
- },
171
- "gpt-5.1-codex-mini": {
172
- "name": "GPT 5.1 Codex Mini (OAuth)",
173
- "limit": {
174
- "context": 272000,
175
- "output": 128000
176
- },
177
- "modalities": {
178
- "input": [
179
- "text",
180
- "image"
181
- ],
182
- "output": [
183
- "text"
184
- ]
185
- },
186
- "variants": {
187
- "medium": {
188
- "reasoningEffort": "medium",
189
- "reasoningSummary": "auto",
190
- "textVerbosity": "medium"
191
- },
192
- "high": {
193
- "reasoningEffort": "high",
194
- "reasoningSummary": "detailed",
195
- "textVerbosity": "medium"
196
- }
197
- }
198
- },
199
- "gpt-5.1": {
200
- "name": "GPT 5.1 (OAuth)",
201
- "limit": {
202
- "context": 272000,
203
- "output": 128000
204
- },
205
- "modalities": {
206
- "input": [
207
- "text",
208
- "image"
209
- ],
210
- "output": [
211
- "text"
212
- ]
213
- },
214
- "variants": {
215
- "none": {
216
- "reasoningEffort": "none",
217
- "reasoningSummary": "auto",
218
- "textVerbosity": "medium"
219
- },
220
- "low": {
221
- "reasoningEffort": "low",
222
- "reasoningSummary": "auto",
223
- "textVerbosity": "low"
224
- },
225
- "medium": {
226
- "reasoningEffort": "medium",
227
- "reasoningSummary": "auto",
228
- "textVerbosity": "medium"
229
- },
230
- "high": {
231
- "reasoningEffort": "high",
232
- "reasoningSummary": "detailed",
233
- "textVerbosity": "high"
234
- }
235
- }
236
- }
237
- }
238
- }
239
- }
240
- }
7
+ "provider": {
8
+ "openai": {
9
+ "options": {
10
+ "reasoningEffort": "medium",
11
+ "reasoningSummary": "auto",
12
+ "textVerbosity": "medium",
13
+ "include": [
14
+ "reasoning.encrypted_content"
15
+ ],
16
+ "store": false
17
+ },
18
+ "models": {
19
+ "gpt-5.2": {
20
+ "name": "GPT 5.2 (OAuth)",
21
+ "limit": {
22
+ "context": 272000,
23
+ "output": 128000
24
+ },
25
+ "modalities": {
26
+ "input": [
27
+ "text",
28
+ "image"
29
+ ],
30
+ "output": [
31
+ "text"
32
+ ]
33
+ },
34
+ "variants": {
35
+ "none": {
36
+ "reasoningEffort": "none",
37
+ "reasoningSummary": "auto",
38
+ "textVerbosity": "medium"
39
+ },
40
+ "low": {
41
+ "reasoningEffort": "low",
42
+ "reasoningSummary": "auto",
43
+ "textVerbosity": "medium"
44
+ },
45
+ "medium": {
46
+ "reasoningEffort": "medium",
47
+ "reasoningSummary": "auto",
48
+ "textVerbosity": "medium"
49
+ },
50
+ "high": {
51
+ "reasoningEffort": "high",
52
+ "reasoningSummary": "detailed",
53
+ "textVerbosity": "medium"
54
+ },
55
+ "xhigh": {
56
+ "reasoningEffort": "xhigh",
57
+ "reasoningSummary": "detailed",
58
+ "textVerbosity": "medium"
59
+ }
60
+ }
61
+ },
62
+ "gpt-5.2-codex": {
63
+ "name": "GPT 5.2 Codex (OAuth)",
64
+ "limit": {
65
+ "context": 272000,
66
+ "output": 128000
67
+ },
68
+ "modalities": {
69
+ "input": [
70
+ "text",
71
+ "image"
72
+ ],
73
+ "output": [
74
+ "text"
75
+ ]
76
+ },
77
+ "variants": {
78
+ "low": {
79
+ "reasoningEffort": "low",
80
+ "reasoningSummary": "auto",
81
+ "textVerbosity": "medium"
82
+ },
83
+ "medium": {
84
+ "reasoningEffort": "medium",
85
+ "reasoningSummary": "auto",
86
+ "textVerbosity": "medium"
87
+ },
88
+ "high": {
89
+ "reasoningEffort": "high",
90
+ "reasoningSummary": "detailed",
91
+ "textVerbosity": "medium"
92
+ },
93
+ "xhigh": {
94
+ "reasoningEffort": "xhigh",
95
+ "reasoningSummary": "detailed",
96
+ "textVerbosity": "medium"
97
+ }
98
+ }
99
+ },
100
+ "gpt-5.1-codex-max": {
101
+ "name": "GPT 5.1 Codex Max (OAuth)",
102
+ "limit": {
103
+ "context": 272000,
104
+ "output": 128000
105
+ },
106
+ "modalities": {
107
+ "input": [
108
+ "text",
109
+ "image"
110
+ ],
111
+ "output": [
112
+ "text"
113
+ ]
114
+ },
115
+ "variants": {
116
+ "low": {
117
+ "reasoningEffort": "low",
118
+ "reasoningSummary": "detailed",
119
+ "textVerbosity": "medium"
120
+ },
121
+ "medium": {
122
+ "reasoningEffort": "medium",
123
+ "reasoningSummary": "detailed",
124
+ "textVerbosity": "medium"
125
+ },
126
+ "high": {
127
+ "reasoningEffort": "high",
128
+ "reasoningSummary": "detailed",
129
+ "textVerbosity": "medium"
130
+ },
131
+ "xhigh": {
132
+ "reasoningEffort": "xhigh",
133
+ "reasoningSummary": "detailed",
134
+ "textVerbosity": "medium"
135
+ }
136
+ }
137
+ },
138
+ "gpt-5.1-codex": {
139
+ "name": "GPT 5.1 Codex (OAuth)",
140
+ "limit": {
141
+ "context": 272000,
142
+ "output": 128000
143
+ },
144
+ "modalities": {
145
+ "input": [
146
+ "text",
147
+ "image"
148
+ ],
149
+ "output": [
150
+ "text"
151
+ ]
152
+ },
153
+ "variants": {
154
+ "low": {
155
+ "reasoningEffort": "low",
156
+ "reasoningSummary": "auto",
157
+ "textVerbosity": "medium"
158
+ },
159
+ "medium": {
160
+ "reasoningEffort": "medium",
161
+ "reasoningSummary": "auto",
162
+ "textVerbosity": "medium"
163
+ },
164
+ "high": {
165
+ "reasoningEffort": "high",
166
+ "reasoningSummary": "detailed",
167
+ "textVerbosity": "medium"
168
+ }
169
+ }
170
+ },
171
+ "gpt-5.1-codex-mini": {
172
+ "name": "GPT 5.1 Codex Mini (OAuth)",
173
+ "limit": {
174
+ "context": 272000,
175
+ "output": 128000
176
+ },
177
+ "modalities": {
178
+ "input": [
179
+ "text",
180
+ "image"
181
+ ],
182
+ "output": [
183
+ "text"
184
+ ]
185
+ },
186
+ "variants": {
187
+ "medium": {
188
+ "reasoningEffort": "medium",
189
+ "reasoningSummary": "auto",
190
+ "textVerbosity": "medium"
191
+ },
192
+ "high": {
193
+ "reasoningEffort": "high",
194
+ "reasoningSummary": "detailed",
195
+ "textVerbosity": "medium"
196
+ }
197
+ }
198
+ },
199
+ "gpt-5.1": {
200
+ "name": "GPT 5.1 (OAuth)",
201
+ "limit": {
202
+ "context": 272000,
203
+ "output": 128000
204
+ },
205
+ "modalities": {
206
+ "input": [
207
+ "text",
208
+ "image"
209
+ ],
210
+ "output": [
211
+ "text"
212
+ ]
213
+ },
214
+ "variants": {
215
+ "none": {
216
+ "reasoningEffort": "none",
217
+ "reasoningSummary": "auto",
218
+ "textVerbosity": "medium"
219
+ },
220
+ "low": {
221
+ "reasoningEffort": "low",
222
+ "reasoningSummary": "auto",
223
+ "textVerbosity": "low"
224
+ },
225
+ "medium": {
226
+ "reasoningEffort": "medium",
227
+ "reasoningSummary": "auto",
228
+ "textVerbosity": "medium"
229
+ },
230
+ "high": {
231
+ "reasoningEffort": "high",
232
+ "reasoningSummary": "detailed",
233
+ "textVerbosity": "high"
234
+ }
235
+ }
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
package/dist/index.d.ts CHANGED
@@ -19,7 +19,7 @@
19
19
  *
20
20
  * @license MIT with Usage Disclaimer (see LICENSE file)
21
21
  * @author numman-ali
22
- * @repository https://github.com/ndycode/opencode-openai-codex-auth-multiaccount
22
+ * @repository https://github.com/ndycode/opencode-openai-codex-auth-multi
23
23
 
24
24
  */
25
25
  import { type Plugin } from "@opencode-ai/plugin";
@@ -33,7 +33,7 @@ import { type Plugin } from "@opencode-ai/plugin";
33
33
  * @example
34
34
  * ```json
35
35
  * {
36
- * "plugin": ["opencode-openai-codex-auth-multiaccount"],
36
+ * "plugin": ["opencode-openai-codex-auth-multi"],
37
37
 
38
38
  * "model": "openai/gpt-5-codex"
39
39
  * }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAQ,KAAK,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AA4C1E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,MA2zB9B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAQ,KAAK,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AA4D1E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,MA4mC9B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}