oc-codex-multi-auth 6.6.0 → 6.7.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.
Files changed (39) hide show
  1. package/config/opencode-legacy.json +425 -0
  2. package/config/opencode-modern.json +139 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +6 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/config.d.ts.map +1 -1
  7. package/dist/lib/config.js +2 -1
  8. package/dist/lib/config.js.map +1 -1
  9. package/dist/lib/prompts/codex.d.ts +7 -1
  10. package/dist/lib/prompts/codex.d.ts.map +1 -1
  11. package/dist/lib/prompts/codex.js +196 -41
  12. package/dist/lib/prompts/codex.js.map +1 -1
  13. package/dist/lib/request/fetch-helpers.d.ts.map +1 -1
  14. package/dist/lib/request/fetch-helpers.js +33 -4
  15. package/dist/lib/request/fetch-helpers.js.map +1 -1
  16. package/dist/lib/request/helpers/effort-suffix.d.ts +25 -0
  17. package/dist/lib/request/helpers/effort-suffix.d.ts.map +1 -0
  18. package/dist/lib/request/helpers/effort-suffix.js +44 -0
  19. package/dist/lib/request/helpers/effort-suffix.js.map +1 -0
  20. package/dist/lib/request/helpers/model-map.d.ts +3 -0
  21. package/dist/lib/request/helpers/model-map.d.ts.map +1 -1
  22. package/dist/lib/request/helpers/model-map.js +49 -0
  23. package/dist/lib/request/helpers/model-map.js.map +1 -1
  24. package/dist/lib/request/helpers/responses-lite.d.ts +34 -0
  25. package/dist/lib/request/helpers/responses-lite.d.ts.map +1 -0
  26. package/dist/lib/request/helpers/responses-lite.js +148 -0
  27. package/dist/lib/request/helpers/responses-lite.js.map +1 -0
  28. package/dist/lib/request/request-transformer.d.ts.map +1 -1
  29. package/dist/lib/request/request-transformer.js +49 -20
  30. package/dist/lib/request/request-transformer.js.map +1 -1
  31. package/dist/lib/schemas.d.ts +9 -0
  32. package/dist/lib/schemas.d.ts.map +1 -1
  33. package/dist/lib/tui-status.d.ts +1 -1
  34. package/dist/lib/tui-status.d.ts.map +1 -1
  35. package/dist/lib/tui-status.js +8 -5
  36. package/dist/lib/tui-status.js.map +1 -1
  37. package/dist/lib/types.d.ts +10 -2
  38. package/dist/lib/types.d.ts.map +1 -1
  39. package/package.json +1 -1
@@ -15,6 +15,431 @@
15
15
  "store": false
16
16
  },
17
17
  "models": {
18
+ "gpt-5.6-sol-low": {
19
+ "name": "GPT 5.6 Sol Low (OAuth)",
20
+ "limit": {
21
+ "context": 1050000,
22
+ "output": 128000
23
+ },
24
+ "modalities": {
25
+ "input": [
26
+ "text",
27
+ "image"
28
+ ],
29
+ "output": [
30
+ "text"
31
+ ]
32
+ },
33
+ "options": {
34
+ "reasoningEffort": "low",
35
+ "reasoningSummary": "auto",
36
+ "textVerbosity": "medium",
37
+ "include": [
38
+ "reasoning.encrypted_content"
39
+ ],
40
+ "store": false
41
+ }
42
+ },
43
+ "gpt-5.6-sol-medium": {
44
+ "name": "GPT 5.6 Sol Medium (OAuth)",
45
+ "limit": {
46
+ "context": 1050000,
47
+ "output": 128000
48
+ },
49
+ "modalities": {
50
+ "input": [
51
+ "text",
52
+ "image"
53
+ ],
54
+ "output": [
55
+ "text"
56
+ ]
57
+ },
58
+ "options": {
59
+ "reasoningEffort": "medium",
60
+ "reasoningSummary": "auto",
61
+ "textVerbosity": "medium",
62
+ "include": [
63
+ "reasoning.encrypted_content"
64
+ ],
65
+ "store": false
66
+ }
67
+ },
68
+ "gpt-5.6-sol-high": {
69
+ "name": "GPT 5.6 Sol High (OAuth)",
70
+ "limit": {
71
+ "context": 1050000,
72
+ "output": 128000
73
+ },
74
+ "modalities": {
75
+ "input": [
76
+ "text",
77
+ "image"
78
+ ],
79
+ "output": [
80
+ "text"
81
+ ]
82
+ },
83
+ "options": {
84
+ "reasoningEffort": "high",
85
+ "reasoningSummary": "detailed",
86
+ "textVerbosity": "medium",
87
+ "include": [
88
+ "reasoning.encrypted_content"
89
+ ],
90
+ "store": false
91
+ }
92
+ },
93
+ "gpt-5.6-sol-xhigh": {
94
+ "name": "GPT 5.6 Sol Xhigh (OAuth)",
95
+ "limit": {
96
+ "context": 1050000,
97
+ "output": 128000
98
+ },
99
+ "modalities": {
100
+ "input": [
101
+ "text",
102
+ "image"
103
+ ],
104
+ "output": [
105
+ "text"
106
+ ]
107
+ },
108
+ "options": {
109
+ "reasoningEffort": "xhigh",
110
+ "reasoningSummary": "detailed",
111
+ "textVerbosity": "medium",
112
+ "include": [
113
+ "reasoning.encrypted_content"
114
+ ],
115
+ "store": false
116
+ }
117
+ },
118
+ "gpt-5.6-sol-max": {
119
+ "name": "GPT 5.6 Sol Max (OAuth)",
120
+ "limit": {
121
+ "context": 1050000,
122
+ "output": 128000
123
+ },
124
+ "modalities": {
125
+ "input": [
126
+ "text",
127
+ "image"
128
+ ],
129
+ "output": [
130
+ "text"
131
+ ]
132
+ },
133
+ "options": {
134
+ "reasoningEffort": "max",
135
+ "reasoningSummary": "detailed",
136
+ "textVerbosity": "medium",
137
+ "include": [
138
+ "reasoning.encrypted_content"
139
+ ],
140
+ "store": false
141
+ }
142
+ },
143
+ "gpt-5.6-sol-ultra": {
144
+ "name": "GPT 5.6 Sol Ultra (OAuth)",
145
+ "limit": {
146
+ "context": 1050000,
147
+ "output": 128000
148
+ },
149
+ "modalities": {
150
+ "input": [
151
+ "text",
152
+ "image"
153
+ ],
154
+ "output": [
155
+ "text"
156
+ ]
157
+ },
158
+ "options": {
159
+ "reasoningEffort": "ultra",
160
+ "reasoningSummary": "detailed",
161
+ "textVerbosity": "medium",
162
+ "include": [
163
+ "reasoning.encrypted_content"
164
+ ],
165
+ "store": false
166
+ }
167
+ },
168
+ "gpt-5.6-terra-low": {
169
+ "name": "GPT 5.6 Terra Low (OAuth)",
170
+ "limit": {
171
+ "context": 1050000,
172
+ "output": 128000
173
+ },
174
+ "modalities": {
175
+ "input": [
176
+ "text",
177
+ "image"
178
+ ],
179
+ "output": [
180
+ "text"
181
+ ]
182
+ },
183
+ "options": {
184
+ "reasoningEffort": "low",
185
+ "reasoningSummary": "auto",
186
+ "textVerbosity": "medium",
187
+ "include": [
188
+ "reasoning.encrypted_content"
189
+ ],
190
+ "store": false
191
+ }
192
+ },
193
+ "gpt-5.6-terra-medium": {
194
+ "name": "GPT 5.6 Terra Medium (OAuth)",
195
+ "limit": {
196
+ "context": 1050000,
197
+ "output": 128000
198
+ },
199
+ "modalities": {
200
+ "input": [
201
+ "text",
202
+ "image"
203
+ ],
204
+ "output": [
205
+ "text"
206
+ ]
207
+ },
208
+ "options": {
209
+ "reasoningEffort": "medium",
210
+ "reasoningSummary": "auto",
211
+ "textVerbosity": "medium",
212
+ "include": [
213
+ "reasoning.encrypted_content"
214
+ ],
215
+ "store": false
216
+ }
217
+ },
218
+ "gpt-5.6-terra-high": {
219
+ "name": "GPT 5.6 Terra High (OAuth)",
220
+ "limit": {
221
+ "context": 1050000,
222
+ "output": 128000
223
+ },
224
+ "modalities": {
225
+ "input": [
226
+ "text",
227
+ "image"
228
+ ],
229
+ "output": [
230
+ "text"
231
+ ]
232
+ },
233
+ "options": {
234
+ "reasoningEffort": "high",
235
+ "reasoningSummary": "detailed",
236
+ "textVerbosity": "medium",
237
+ "include": [
238
+ "reasoning.encrypted_content"
239
+ ],
240
+ "store": false
241
+ }
242
+ },
243
+ "gpt-5.6-terra-xhigh": {
244
+ "name": "GPT 5.6 Terra Xhigh (OAuth)",
245
+ "limit": {
246
+ "context": 1050000,
247
+ "output": 128000
248
+ },
249
+ "modalities": {
250
+ "input": [
251
+ "text",
252
+ "image"
253
+ ],
254
+ "output": [
255
+ "text"
256
+ ]
257
+ },
258
+ "options": {
259
+ "reasoningEffort": "xhigh",
260
+ "reasoningSummary": "detailed",
261
+ "textVerbosity": "medium",
262
+ "include": [
263
+ "reasoning.encrypted_content"
264
+ ],
265
+ "store": false
266
+ }
267
+ },
268
+ "gpt-5.6-terra-max": {
269
+ "name": "GPT 5.6 Terra Max (OAuth)",
270
+ "limit": {
271
+ "context": 1050000,
272
+ "output": 128000
273
+ },
274
+ "modalities": {
275
+ "input": [
276
+ "text",
277
+ "image"
278
+ ],
279
+ "output": [
280
+ "text"
281
+ ]
282
+ },
283
+ "options": {
284
+ "reasoningEffort": "max",
285
+ "reasoningSummary": "detailed",
286
+ "textVerbosity": "medium",
287
+ "include": [
288
+ "reasoning.encrypted_content"
289
+ ],
290
+ "store": false
291
+ }
292
+ },
293
+ "gpt-5.6-terra-ultra": {
294
+ "name": "GPT 5.6 Terra Ultra (OAuth)",
295
+ "limit": {
296
+ "context": 1050000,
297
+ "output": 128000
298
+ },
299
+ "modalities": {
300
+ "input": [
301
+ "text",
302
+ "image"
303
+ ],
304
+ "output": [
305
+ "text"
306
+ ]
307
+ },
308
+ "options": {
309
+ "reasoningEffort": "ultra",
310
+ "reasoningSummary": "detailed",
311
+ "textVerbosity": "medium",
312
+ "include": [
313
+ "reasoning.encrypted_content"
314
+ ],
315
+ "store": false
316
+ }
317
+ },
318
+ "gpt-5.6-luna-low": {
319
+ "name": "GPT 5.6 Luna Low (OAuth)",
320
+ "limit": {
321
+ "context": 1050000,
322
+ "output": 128000
323
+ },
324
+ "modalities": {
325
+ "input": [
326
+ "text",
327
+ "image"
328
+ ],
329
+ "output": [
330
+ "text"
331
+ ]
332
+ },
333
+ "options": {
334
+ "reasoningEffort": "low",
335
+ "reasoningSummary": "auto",
336
+ "textVerbosity": "medium",
337
+ "include": [
338
+ "reasoning.encrypted_content"
339
+ ],
340
+ "store": false
341
+ }
342
+ },
343
+ "gpt-5.6-luna-medium": {
344
+ "name": "GPT 5.6 Luna Medium (OAuth)",
345
+ "limit": {
346
+ "context": 1050000,
347
+ "output": 128000
348
+ },
349
+ "modalities": {
350
+ "input": [
351
+ "text",
352
+ "image"
353
+ ],
354
+ "output": [
355
+ "text"
356
+ ]
357
+ },
358
+ "options": {
359
+ "reasoningEffort": "medium",
360
+ "reasoningSummary": "auto",
361
+ "textVerbosity": "medium",
362
+ "include": [
363
+ "reasoning.encrypted_content"
364
+ ],
365
+ "store": false
366
+ }
367
+ },
368
+ "gpt-5.6-luna-high": {
369
+ "name": "GPT 5.6 Luna High (OAuth)",
370
+ "limit": {
371
+ "context": 1050000,
372
+ "output": 128000
373
+ },
374
+ "modalities": {
375
+ "input": [
376
+ "text",
377
+ "image"
378
+ ],
379
+ "output": [
380
+ "text"
381
+ ]
382
+ },
383
+ "options": {
384
+ "reasoningEffort": "high",
385
+ "reasoningSummary": "detailed",
386
+ "textVerbosity": "medium",
387
+ "include": [
388
+ "reasoning.encrypted_content"
389
+ ],
390
+ "store": false
391
+ }
392
+ },
393
+ "gpt-5.6-luna-xhigh": {
394
+ "name": "GPT 5.6 Luna Xhigh (OAuth)",
395
+ "limit": {
396
+ "context": 1050000,
397
+ "output": 128000
398
+ },
399
+ "modalities": {
400
+ "input": [
401
+ "text",
402
+ "image"
403
+ ],
404
+ "output": [
405
+ "text"
406
+ ]
407
+ },
408
+ "options": {
409
+ "reasoningEffort": "xhigh",
410
+ "reasoningSummary": "detailed",
411
+ "textVerbosity": "medium",
412
+ "include": [
413
+ "reasoning.encrypted_content"
414
+ ],
415
+ "store": false
416
+ }
417
+ },
418
+ "gpt-5.6-luna-max": {
419
+ "name": "GPT 5.6 Luna Max (OAuth)",
420
+ "limit": {
421
+ "context": 1050000,
422
+ "output": 128000
423
+ },
424
+ "modalities": {
425
+ "input": [
426
+ "text",
427
+ "image"
428
+ ],
429
+ "output": [
430
+ "text"
431
+ ]
432
+ },
433
+ "options": {
434
+ "reasoningEffort": "max",
435
+ "reasoningSummary": "detailed",
436
+ "textVerbosity": "medium",
437
+ "include": [
438
+ "reasoning.encrypted_content"
439
+ ],
440
+ "store": false
441
+ }
442
+ },
18
443
  "gpt-5.5-none": {
19
444
  "name": "GPT 5.5 None (OAuth)",
20
445
  "limit": {
@@ -15,6 +15,145 @@
15
15
  "store": false
16
16
  },
17
17
  "models": {
18
+ "gpt-5.6-sol": {
19
+ "name": "GPT 5.6 Sol (OAuth)",
20
+ "limit": {
21
+ "context": 1050000,
22
+ "output": 128000
23
+ },
24
+ "modalities": {
25
+ "input": [
26
+ "text",
27
+ "image"
28
+ ],
29
+ "output": [
30
+ "text"
31
+ ]
32
+ },
33
+ "variants": {
34
+ "low": {
35
+ "reasoningEffort": "low",
36
+ "reasoningSummary": "auto",
37
+ "textVerbosity": "medium"
38
+ },
39
+ "medium": {
40
+ "reasoningEffort": "medium",
41
+ "reasoningSummary": "auto",
42
+ "textVerbosity": "medium"
43
+ },
44
+ "high": {
45
+ "reasoningEffort": "high",
46
+ "reasoningSummary": "detailed",
47
+ "textVerbosity": "medium"
48
+ },
49
+ "xhigh": {
50
+ "reasoningEffort": "xhigh",
51
+ "reasoningSummary": "detailed",
52
+ "textVerbosity": "medium"
53
+ },
54
+ "max": {
55
+ "reasoningEffort": "max",
56
+ "reasoningSummary": "detailed",
57
+ "textVerbosity": "medium"
58
+ },
59
+ "ultra": {
60
+ "reasoningEffort": "ultra",
61
+ "reasoningSummary": "detailed",
62
+ "textVerbosity": "medium"
63
+ }
64
+ }
65
+ },
66
+ "gpt-5.6-terra": {
67
+ "name": "GPT 5.6 Terra (OAuth)",
68
+ "limit": {
69
+ "context": 1050000,
70
+ "output": 128000
71
+ },
72
+ "modalities": {
73
+ "input": [
74
+ "text",
75
+ "image"
76
+ ],
77
+ "output": [
78
+ "text"
79
+ ]
80
+ },
81
+ "variants": {
82
+ "low": {
83
+ "reasoningEffort": "low",
84
+ "reasoningSummary": "auto",
85
+ "textVerbosity": "medium"
86
+ },
87
+ "medium": {
88
+ "reasoningEffort": "medium",
89
+ "reasoningSummary": "auto",
90
+ "textVerbosity": "medium"
91
+ },
92
+ "high": {
93
+ "reasoningEffort": "high",
94
+ "reasoningSummary": "detailed",
95
+ "textVerbosity": "medium"
96
+ },
97
+ "xhigh": {
98
+ "reasoningEffort": "xhigh",
99
+ "reasoningSummary": "detailed",
100
+ "textVerbosity": "medium"
101
+ },
102
+ "max": {
103
+ "reasoningEffort": "max",
104
+ "reasoningSummary": "detailed",
105
+ "textVerbosity": "medium"
106
+ },
107
+ "ultra": {
108
+ "reasoningEffort": "ultra",
109
+ "reasoningSummary": "detailed",
110
+ "textVerbosity": "medium"
111
+ }
112
+ }
113
+ },
114
+ "gpt-5.6-luna": {
115
+ "name": "GPT 5.6 Luna (OAuth)",
116
+ "limit": {
117
+ "context": 1050000,
118
+ "output": 128000
119
+ },
120
+ "modalities": {
121
+ "input": [
122
+ "text",
123
+ "image"
124
+ ],
125
+ "output": [
126
+ "text"
127
+ ]
128
+ },
129
+ "variants": {
130
+ "low": {
131
+ "reasoningEffort": "low",
132
+ "reasoningSummary": "auto",
133
+ "textVerbosity": "medium"
134
+ },
135
+ "medium": {
136
+ "reasoningEffort": "medium",
137
+ "reasoningSummary": "auto",
138
+ "textVerbosity": "medium"
139
+ },
140
+ "high": {
141
+ "reasoningEffort": "high",
142
+ "reasoningSummary": "detailed",
143
+ "textVerbosity": "medium"
144
+ },
145
+ "xhigh": {
146
+ "reasoningEffort": "xhigh",
147
+ "reasoningSummary": "detailed",
148
+ "textVerbosity": "medium"
149
+ },
150
+ "max": {
151
+ "reasoningEffort": "max",
152
+ "reasoningSummary": "detailed",
153
+ "textVerbosity": "medium"
154
+ }
155
+ }
156
+ },
18
157
  "gpt-5.5": {
19
158
  "name": "GPT 5.5 (OAuth)",
20
159
  "limit": {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AA0M/D;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,iBAAiB,EAAE,MAyrH/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAoB,CAAC;AAElD,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AA2M/D;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,iBAAiB,EAAE,MA6rH/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAoB,CAAC;AAElD,eAAe,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -42,6 +42,7 @@ import { resolveDisplayEmail } from "./lib/account-display.js";
42
42
  import { CodexAuthError } from "./lib/errors.js";
43
43
  import { getStoragePath, loadAccounts, saveAccounts, withAccountStorageTransaction, clearAccounts, setStoragePath, loadFlaggedAccounts, saveFlaggedAccounts, withFlaggedAccountStorageTransaction, clearFlaggedAccounts, getWorkspaceIdentityKey, StorageError, formatStorageErrorHint, } from "./lib/storage.js";
44
44
  import { createCodexHeaders, extractRequestUrl, handleErrorResponse, handleSuccessResponse, isDeactivatedWorkspaceError, isInvalidatedAuthTokenError, createAbortError, getUnsupportedCodexModelInfo, resolveUnsupportedCodexFallbackModel, refreshAndUpdateToken, rewriteUrlForCodex, shouldRefreshToken, transformRequestForCodex, } from "./lib/request/fetch-helpers.js";
45
+ import { shapeBodyForModel } from "./lib/request/helpers/responses-lite.js";
45
46
  import { createDeactivatedWorkspaceError, DEACTIVATED_WORKSPACE_ERROR_CODE, isDeactivatedWorkspaceErrorMessage, isInvalidatedAuthTokenMessage, } from "./lib/error-sentinels.js";
46
47
  import { applyFastSessionDefaults, upsertBackendModelIdentityMessage, } from "./lib/request/request-transformer.js";
47
48
  import { getRateLimitBackoff, RATE_LIMIT_SHORT_RETRY_THRESHOLD_MS, resetRateLimitBackoff, } from "./lib/request/rate-limit-backoff.js";
@@ -1755,9 +1756,13 @@ export const OpenAIOAuthPlugin = async ({ client }) => {
1755
1756
  }
1756
1757
  transformedBody = fallbackBody;
1757
1758
  }
1759
+ // Shape for whichever model this attempt targets. A 5.6 -> 5.5 fallback
1760
+ // must go out in the classic shape, and a 5.6 -> 5.6 hop must re-fold
1761
+ // the new model's instructions into `input` rather than leaving them
1762
+ // at the top level.
1758
1763
  requestInit = {
1759
1764
  ...(requestInit ?? {}),
1760
- body: JSON.stringify(transformedBody),
1765
+ body: JSON.stringify(shapeBodyForModel(transformedBody)),
1761
1766
  };
1762
1767
  if (runtimeMetrics.lastSelectionSnapshot) {
1763
1768
  runtimeMetrics.lastSelectionSnapshot = {