codex-multi-auth 2.10.0 → 2.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/.codex-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/config/README.md +3 -1
- package/config/codex-legacy.json +300 -0
- package/config/codex-modern.json +96 -0
- package/dist/lib/capability-policy.d.ts.map +1 -1
- package/dist/lib/capability-policy.js +16 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +3 -1
- package/dist/lib/context-budget/model-context-windows.d.ts +1 -1
- package/dist/lib/context-budget/model-context-windows.d.ts.map +1 -1
- package/dist/lib/context-budget/model-context-windows.js +12 -0
- package/dist/lib/model-capability-matrix.d.ts.map +1 -1
- package/dist/lib/model-capability-matrix.js +9 -1
- package/dist/lib/request/error-classification.d.ts.map +1 -1
- package/dist/lib/request/error-classification.js +43 -2
- package/dist/lib/request/helpers/model-map.d.ts.map +1 -1
- package/dist/lib/request/helpers/model-map.js +181 -0
- package/dist/lib/usage/pricing.d.ts +1 -1
- package/dist/lib/usage/pricing.d.ts.map +1 -1
- package/dist/lib/usage/pricing.js +33 -0
- package/package.json +1 -1
- package/scripts/codex.js +153 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-multi-auth",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Install and operate codex-multi-auth for the official @openai/codex CLI with multi-account OAuth rotation, switching, health checks, and recovery tools.",
|
|
5
5
|
"interface": {
|
|
6
6
|
"composerIcon": "./assets/codex-multi-auth-icon.svg"
|
package/README.md
CHANGED
|
@@ -406,7 +406,7 @@ codex-multi-auth doctor --json
|
|
|
406
406
|
|
|
407
407
|
## Release Notes
|
|
408
408
|
|
|
409
|
-
- Current stable: [docs/releases/v2.
|
|
409
|
+
- Current stable: [docs/releases/v2.11.0.md](docs/releases/v2.11.0.md) — install via `npm i -g codex-multi-auth`
|
|
410
410
|
- Previous stable: [docs/releases/v2.8.3.md](docs/releases/v2.8.3.md)
|
|
411
411
|
- Previous stable: [docs/releases/v2.8.2.md](docs/releases/v2.8.2.md)
|
|
412
412
|
- Previous stable: [docs/releases/v2.7.1.md](docs/releases/v2.7.1.md)
|
package/config/README.md
CHANGED
|
@@ -17,7 +17,9 @@ These files are optional model/provider templates for host/plugin configurations
|
|
|
17
17
|
|
|
18
18
|
## Defaults Included
|
|
19
19
|
|
|
20
|
-
- Current documented OpenAI/Codex model families (`gpt-5.6-sol`/`terra`/`luna`, `gpt-5.5`, `gpt-5.4`, and `gpt-5.3-codex`
|
|
20
|
+
- Current documented OpenAI/Codex model families: GPT-6 Astra (`gpt-6-astra`, `gpt-6-astra-aeon`), then `gpt-5.6-sol`/`terra`/`luna`, `gpt-5.5`, `gpt-5.4`, and `gpt-5.3-codex`
|
|
21
|
+
- The Astra entries carry `limit.context: 272000`, OpenAI's stable Codex context value at launch. The GPT-5.6 entries still carry the pre-cut `372000` and were left alone here; change them only alongside a deliberate review, since the value feeds a picker rather than the context budget guard (which refuses to estimate either family)
|
|
22
|
+
- The Daybreak cyber models resolve at the code level but are deliberately absent from these templates, matching their hidden visibility in the upstream Codex picker
|
|
21
23
|
- `store: false`
|
|
22
24
|
- `include: ["reasoning.encrypted_content"]`
|
|
23
25
|
- Sensible fallback behavior for unsupported model entitlements
|
package/config/codex-legacy.json
CHANGED
|
@@ -15,6 +15,306 @@
|
|
|
15
15
|
"store": false
|
|
16
16
|
},
|
|
17
17
|
"models": {
|
|
18
|
+
"gpt-6-astra-low": {
|
|
19
|
+
"name": "GPT 6 Astra Low (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": "low",
|
|
35
|
+
"reasoningSummary": "auto",
|
|
36
|
+
"textVerbosity": "medium",
|
|
37
|
+
"include": [
|
|
38
|
+
"reasoning.encrypted_content"
|
|
39
|
+
],
|
|
40
|
+
"store": false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"gpt-6-astra-medium": {
|
|
44
|
+
"name": "GPT 6 Astra Medium (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": "medium",
|
|
60
|
+
"reasoningSummary": "auto",
|
|
61
|
+
"textVerbosity": "medium",
|
|
62
|
+
"include": [
|
|
63
|
+
"reasoning.encrypted_content"
|
|
64
|
+
],
|
|
65
|
+
"store": false
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"gpt-6-astra-high": {
|
|
69
|
+
"name": "GPT 6 Astra High (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": "high",
|
|
85
|
+
"reasoningSummary": "detailed",
|
|
86
|
+
"textVerbosity": "medium",
|
|
87
|
+
"include": [
|
|
88
|
+
"reasoning.encrypted_content"
|
|
89
|
+
],
|
|
90
|
+
"store": false
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"gpt-6-astra-xhigh": {
|
|
94
|
+
"name": "GPT 6 Astra Extra 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": "xhigh",
|
|
110
|
+
"reasoningSummary": "detailed",
|
|
111
|
+
"textVerbosity": "medium",
|
|
112
|
+
"include": [
|
|
113
|
+
"reasoning.encrypted_content"
|
|
114
|
+
],
|
|
115
|
+
"store": false
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"gpt-6-astra-max": {
|
|
119
|
+
"name": "GPT 6 Astra Max (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": "max",
|
|
135
|
+
"reasoningSummary": "detailed",
|
|
136
|
+
"textVerbosity": "medium",
|
|
137
|
+
"include": [
|
|
138
|
+
"reasoning.encrypted_content"
|
|
139
|
+
],
|
|
140
|
+
"store": false
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"gpt-6-astra-ultra": {
|
|
144
|
+
"name": "GPT 6 Astra Ultra (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": "ultra",
|
|
160
|
+
"reasoningSummary": "detailed",
|
|
161
|
+
"textVerbosity": "medium",
|
|
162
|
+
"include": [
|
|
163
|
+
"reasoning.encrypted_content"
|
|
164
|
+
],
|
|
165
|
+
"store": false
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"gpt-6-astra-aeon-low": {
|
|
169
|
+
"name": "GPT 6 Astra Aeon Low (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": "low",
|
|
185
|
+
"reasoningSummary": "auto",
|
|
186
|
+
"textVerbosity": "medium",
|
|
187
|
+
"include": [
|
|
188
|
+
"reasoning.encrypted_content"
|
|
189
|
+
],
|
|
190
|
+
"store": false
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"gpt-6-astra-aeon-medium": {
|
|
194
|
+
"name": "GPT 6 Astra Aeon Medium (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": "medium",
|
|
210
|
+
"reasoningSummary": "auto",
|
|
211
|
+
"textVerbosity": "medium",
|
|
212
|
+
"include": [
|
|
213
|
+
"reasoning.encrypted_content"
|
|
214
|
+
],
|
|
215
|
+
"store": false
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"gpt-6-astra-aeon-high": {
|
|
219
|
+
"name": "GPT 6 Astra Aeon 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": "high",
|
|
235
|
+
"reasoningSummary": "detailed",
|
|
236
|
+
"textVerbosity": "medium",
|
|
237
|
+
"include": [
|
|
238
|
+
"reasoning.encrypted_content"
|
|
239
|
+
],
|
|
240
|
+
"store": false
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"gpt-6-astra-aeon-xhigh": {
|
|
244
|
+
"name": "GPT 6 Astra Aeon Extra High (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": "xhigh",
|
|
260
|
+
"reasoningSummary": "detailed",
|
|
261
|
+
"textVerbosity": "medium",
|
|
262
|
+
"include": [
|
|
263
|
+
"reasoning.encrypted_content"
|
|
264
|
+
],
|
|
265
|
+
"store": false
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"gpt-6-astra-aeon-max": {
|
|
269
|
+
"name": "GPT 6 Astra Aeon Max (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": "max",
|
|
285
|
+
"reasoningSummary": "detailed",
|
|
286
|
+
"textVerbosity": "medium",
|
|
287
|
+
"include": [
|
|
288
|
+
"reasoning.encrypted_content"
|
|
289
|
+
],
|
|
290
|
+
"store": false
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"gpt-6-astra-aeon-ultra": {
|
|
294
|
+
"name": "GPT 6 Astra Aeon Ultra (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": "ultra",
|
|
310
|
+
"reasoningSummary": "detailed",
|
|
311
|
+
"textVerbosity": "medium",
|
|
312
|
+
"include": [
|
|
313
|
+
"reasoning.encrypted_content"
|
|
314
|
+
],
|
|
315
|
+
"store": false
|
|
316
|
+
}
|
|
317
|
+
},
|
|
18
318
|
"gpt-5.6-sol-low": {
|
|
19
319
|
"name": "GPT 5.6 Sol Low (OAuth)",
|
|
20
320
|
"limit": {
|
package/config/codex-modern.json
CHANGED
|
@@ -15,6 +15,102 @@
|
|
|
15
15
|
"store": false
|
|
16
16
|
},
|
|
17
17
|
"models": {
|
|
18
|
+
"gpt-6-astra": {
|
|
19
|
+
"name": "GPT 6 Astra (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
|
+
"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-6-astra-aeon": {
|
|
67
|
+
"name": "GPT 6 Astra Aeon (OAuth)",
|
|
68
|
+
"limit": {
|
|
69
|
+
"context": 272000,
|
|
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
|
+
},
|
|
18
114
|
"gpt-5.6-sol": {
|
|
19
115
|
"name": "GPT 5.6 Sol (OAuth)",
|
|
20
116
|
"limit": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-policy.d.ts","sourceRoot":"","sources":["../../lib/capability-policy.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,wBAAwB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"capability-policy.d.ts","sourceRoot":"","sources":["../../lib/capability-policy.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,wBAAwB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAyED,qBAAa,qBAAqB;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;IAE9D,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,IAAI;IAkBxE,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,IAAI;IAgBxE,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,IAAI;IAgB5E,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAa,GAAG,MAAM;IAiBrE,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,wBAAwB,GAAG,IAAI;IAc/E,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAYxC,OAAO,CAAC,aAAa;CASrB"}
|
|
@@ -22,7 +22,22 @@ function normalizeModel(model) {
|
|
|
22
22
|
? (trimmedInput.split("/").pop() ?? trimmedInput)
|
|
23
23
|
: trimmedInput;
|
|
24
24
|
const exactMatch = getNormalizedModel(withoutProvider);
|
|
25
|
-
|
|
25
|
+
// The catalog fallback is gated so an unrelated model id is not dragged onto
|
|
26
|
+
// a GPT-5 default. GPT-6 Astra and the Daybreak cyber models have to be named
|
|
27
|
+
// here as well: without them an id the alias table does not carry, such as
|
|
28
|
+
// `gpt-6-astra-pro`, keeps its raw string as the policy key while routing
|
|
29
|
+
// resolves it to `gpt-6-astra`, so the policy store tracks a key no request
|
|
30
|
+
// ever uses.
|
|
31
|
+
//
|
|
32
|
+
// The separator class matches `tokenizeModelId`, which splits on any RUN of
|
|
33
|
+
// non-alphanumerics. A hand-picked `[-_\s]` was narrower than the resolver it
|
|
34
|
+
// guards, so `gpt.6-turbo` kept its raw key here while
|
|
35
|
+
// `resolveNormalizedModel` routed it to `gpt-6-astra`; `*` rather than `?`
|
|
36
|
+
// because the tokenizer collapses repeats, so `gpt..6-turbo` and `gpt---5`
|
|
37
|
+
// resolve too. It must not widen to every hyphenated id: an unknown one
|
|
38
|
+
// would inherit the DEFAULT_MODEL key, which is why `gpt-4o`,
|
|
39
|
+
// `gpt-4.5-preview` and `gpt.4-turbo` still fail this test.
|
|
40
|
+
const shouldUseFallbackCatalog = /gpt[^a-z0-9]*[56]|codex|astra|daybreak/i.test(withoutProvider);
|
|
26
41
|
const mapped = exactMatch ??
|
|
27
42
|
(shouldUseFallbackCatalog
|
|
28
43
|
? resolveNormalizedModel(withoutProvider)
|
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../lib/config.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAoE/C,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE3D,KAAK,wBAAwB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAE3E,KAAK,yBAAyB,GAAG,OAAO,CACvC,wBAAwB,EACxB,SAAS,GAAG,MAAM,CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,yBAAyB,GAAG,SAAS,CAAC;AAEhF,MAAM,WAAW,kBAAkB;IAClC,GAAG,EAAE,MAAM,YAAY,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,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AY,EAAE,YAAY,GAAG,MAAM,CAO3E;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAM3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAM7E;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CACnD,YAAY,EAAE,YAAY,GACxB,MAAM,CAOR;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oCAAoC,CACnD,YAAY,EAAE,YAAY,GACxB,MAAM,CAOR;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+BAA+B,CAC9C,YAAY,EAAE,YAAY,GACxB,MAAM,CAOR;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAMhF;AAED,gGAAgG;AAChG,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAOnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAOnF;AAED;;;;;;GAMG;AACH,wBAAgB,yCAAyC,CACxD,YAAY,EAAE,YAAY,GACxB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkBxB;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAClC,YAAY,EAAE,YAAY,GACxB,SAAS,GAAG,QAAQ,CAOtB;AAID;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CACpC,YAAY,EAAE,YAAY,GACxB,QAAQ,GAAG,YAAY,CAOzB;AA2XD,wBAAgB,4BAA4B,IAAI,mBAAmB,CA0BlE"}
|
package/dist/lib/config.js
CHANGED
|
@@ -951,7 +951,9 @@ export function getUnsupportedCodexFallbackChain(pluginConfig) {
|
|
|
951
951
|
: trimmed;
|
|
952
952
|
return stripped.replace(/-(none|minimal|low|medium|high|xhigh)$/i, "");
|
|
953
953
|
};
|
|
954
|
-
|
|
954
|
+
// Null-prototype: the keys come from user config, so a `__proto__` entry on a
|
|
955
|
+
// plain object would reassign this object's prototype rather than add a row.
|
|
956
|
+
const normalized = Object.create(null);
|
|
955
957
|
for (const [key, value] of Object.entries(chain)) {
|
|
956
958
|
if (typeof key !== "string" || !Array.isArray(value))
|
|
957
959
|
continue;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* behavior (see the v2.5.0 release notes) closely enough to launch that no
|
|
7
7
|
* estimate here has been reviewed for it yet.
|
|
8
8
|
*/
|
|
9
|
-
export declare const UNESTIMATED_ROUTABLE_MODELS: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"];
|
|
9
|
+
export declare const UNESTIMATED_ROUTABLE_MODELS: readonly ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-6-astra", "gpt-6-astra-aeon", "gpt-daybreak-blue-latest", "gpt-daybreak-red-latest"];
|
|
10
10
|
export interface EffectiveContextWindow {
|
|
11
11
|
tokens: number;
|
|
12
12
|
source: "override" | "estimate";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-context-windows.d.ts","sourceRoot":"","sources":["../../../lib/context-budget/model-context-windows.ts"],"names":[],"mappings":"AAyCA;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,
|
|
1
|
+
{"version":3,"file":"model-context-windows.d.ts","sourceRoot":"","sources":["../../../lib/context-budget/model-context-windows.ts"],"names":[],"mappings":"AAyCA;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,qJAgB9B,CAAC;AAgCX,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;CAChC;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACxC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAC3C,sBAAsB,GAAG,IAAI,CA0B/B;AAED,wBAAgB,gCAAgC,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEzE"}
|
|
@@ -48,6 +48,18 @@ export const UNESTIMATED_ROUTABLE_MODELS = [
|
|
|
48
48
|
"gpt-5.6-sol",
|
|
49
49
|
"gpt-5.6-terra",
|
|
50
50
|
"gpt-5.6-luna",
|
|
51
|
+
// GPT-6 Astra published two different numbers on day one: 1.05M for the API
|
|
52
|
+
// surface and 272K as the Codex context. This wrapper talks to the Codex
|
|
53
|
+
// backend, and the same split is what the v2.5.0 notes warn about — so no
|
|
54
|
+
// estimate is entered here. `gpt-daybreak-red-latest` is the one model whose
|
|
55
|
+
// upstream catalog entry pins `context_window` and `max_context_window` to
|
|
56
|
+
// the same 372000, but that is the Codex picker's number rather than a
|
|
57
|
+
// measured ceiling for this transport, so it stays unestimated too. Set
|
|
58
|
+
// `contextBudgetGuardModelWindowOverrides` once you know your real ceiling.
|
|
59
|
+
"gpt-6-astra",
|
|
60
|
+
"gpt-6-astra-aeon",
|
|
61
|
+
"gpt-daybreak-blue-latest",
|
|
62
|
+
"gpt-daybreak-red-latest",
|
|
51
63
|
];
|
|
52
64
|
function normalizeModelName(model) {
|
|
53
65
|
const trimmed = model?.trim().toLowerCase();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-capability-matrix.d.ts","sourceRoot":"","sources":["../../lib/model-capability-matrix.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAGN,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAEN,KAAK,wBAAwB,EAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACX,wBAAwB,EACxB,qBAAqB,EACrB,MAAM,wBA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AgB,GAAG,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC/C,gBAAgB,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAChD,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,GAAG,CAAC,EAAE,MAAM,CAAC;CACb,GAAG,qBAAqB,CAyFxB"}
|
|
@@ -35,7 +35,15 @@ export function buildModelCapabilityMatrix(input) {
|
|
|
35
35
|
});
|
|
36
36
|
const entitlementKeys = [accountKey, entitlementKey];
|
|
37
37
|
for (const model of models) {
|
|
38
|
-
|
|
38
|
+
// `Object.hasOwn` before the index: `models` comes from `--model` on
|
|
39
|
+
// the CLI, so `constructor` and friends reach this lookup and a bare
|
|
40
|
+
// index returns the matching `Object.prototype` member. It is truthy,
|
|
41
|
+
// so the `!profile` guard passes it through and the matrix emits a row
|
|
42
|
+
// whose normalizedModel, promptFamily and capabilities are all
|
|
43
|
+
// undefined.
|
|
44
|
+
const profile = Object.hasOwn(MODEL_PROFILES, model)
|
|
45
|
+
? MODEL_PROFILES[model]
|
|
46
|
+
: MODEL_PROFILES[resolveNormalizedModel(model)];
|
|
39
47
|
if (!profile)
|
|
40
48
|
continue;
|
|
41
49
|
const entitlement = getEntitlementBlock(input.entitlements, entitlementKeys, profile.normalizedModel, now);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-classification.d.ts","sourceRoot":"","sources":["../../../lib/request/error-classification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,WAAW,gBAAgB;IACzB,aAAa,EAAE,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACvB;AAED,sGAAsG;AACtG,eAAO,MAAM,oCAAoC,6CAA6C,CAAC;AAQ/F,eAAO,MAAM,wCAAwC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"error-classification.d.ts","sourceRoot":"","sources":["../../../lib/request/error-classification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,WAAW,gBAAgB;IACzB,aAAa,EAAE,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACvB;AAED,sGAAsG;AACtG,eAAO,MAAM,oCAAoC,6CAA6C,CAAC;AAQ/F,eAAO,MAAM,wCAAwC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAoD7E,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sCAAsC;IACtD,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,+BAA+B,EAAE,OAAO,CAAC;IACzC,iCAAiC,EAAE,OAAO,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACvC;AAiDD,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgBzF;AAED,sGAAsG;AACtG,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQ3F;AAED,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,OAAO,GAChB,yBAAyB,CAqD3B;AAED,wBAAgB,oCAAoC,CACnD,OAAO,EAAE,sCAAsC,GAC7C,MAAM,GAAG,SAAS,CAkCpB;AAED;;GAEG;AACH,wBAAgB,uCAAuC,CACtD,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,SAAS,EAAE,OAAO,GAChB,OAAO,CAgBT;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,MAAM,GACrB,OAAO,CAoDT;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,CAmB1E"}
|
|
@@ -11,6 +11,38 @@ const CHATGPT_CODEX_UNSUPPORTED_MODEL_PATTERN = /model is not supported when usi
|
|
|
11
11
|
const NORMALIZED_UNSUPPORTED_MODEL_PATTERN = /the model ['"]([^'"]+)['"] is not currently available for this chatgpt account/i;
|
|
12
12
|
const MODEL_ACCESS_DENIED_PATTERN = /the model [`'"]([^`'"]+)[`'"] does not exist or you do not have access to it/i;
|
|
13
13
|
export const DEFAULT_UNSUPPORTED_CODEX_FALLBACK_CHAIN = {
|
|
14
|
+
// GPT-6 Astra rolls out org by org, so an account that is not entitled yet
|
|
15
|
+
// gets a real unsupported-model response for it. This chain only fires when
|
|
16
|
+
// the user has opted into `fallbackOnUnsupportedCodexModel` (default
|
|
17
|
+
// `false`), and only on that response, so it never silently swaps the model
|
|
18
|
+
// out from under a request the account could have served.
|
|
19
|
+
//
|
|
20
|
+
// This table is walked ONE HOP AT A TIME, not as a per-request candidate
|
|
21
|
+
// list. index.ts reassigns `model` to whatever came back and passes that as
|
|
22
|
+
// `requestedModel` on the next unsupported response, so reaching `gpt-5.5`
|
|
23
|
+
// from Astra requires `gpt-5.6-sol` to carry its own entry below. A second
|
|
24
|
+
// element here is only ever consulted when the first is already in
|
|
25
|
+
// `attemptedModels` for that same call.
|
|
26
|
+
//
|
|
27
|
+
// Depth is not free: every hop spends one of the shared per-request outbound
|
|
28
|
+
// attempts (`tryConsumeOutboundRequestAttempt`). A single-account balanced
|
|
29
|
+
// session gets a budget of 5, and the aeon walk needs exactly 5, so it fits
|
|
30
|
+
// with nothing spare. Spend an attempt on a retry or a stream failover and
|
|
31
|
+
// the tail hops become unreachable, ending as an attempt-budget-exhausted
|
|
32
|
+
// 503 rather than `gpt-5.4`. Hops are ordered most-valuable-first so what is
|
|
33
|
+
// lost first matters least. Do not add a hop to a GPT-6 row without
|
|
34
|
+
// re-checking that budget; `test/gpt6-astra-models.test.ts` asserts it.
|
|
35
|
+
"gpt-6-astra": ["gpt-5.6-sol", "gpt-5.5"],
|
|
36
|
+
// aeon steps to the flagship first: still GPT-6, still Astra, just without
|
|
37
|
+
// the long-horizon behaviour.
|
|
38
|
+
"gpt-6-astra-aeon": ["gpt-6-astra", "gpt-5.6-sol"],
|
|
39
|
+
// The hop that makes the Astra path reach a model every account has. GPT-5.6
|
|
40
|
+
// shipped without a chain entry, so an unsupported 5.6 response ended the
|
|
41
|
+
// walk; with Astra above it that would have stranded the fallback one rung
|
|
42
|
+
// short of the floor it documents. Terra and Luna are deliberately still
|
|
43
|
+
// absent: nothing steps into them, so giving them a hop would change 5.6
|
|
44
|
+
// behaviour beyond completing this path.
|
|
45
|
+
"gpt-5.6-sol": ["gpt-5.5"],
|
|
14
46
|
"gpt-5": ["gpt-5.5"],
|
|
15
47
|
"gpt-5-pro": ["gpt-5.5-pro"],
|
|
16
48
|
"gpt-5-chat-latest": ["gpt-5.5"],
|
|
@@ -43,7 +75,14 @@ function canonicalizeModelName(model) {
|
|
|
43
75
|
return stripped.replace(/-(none|minimal|low|medium|high|xhigh)$/i, "");
|
|
44
76
|
}
|
|
45
77
|
function normalizeFallbackChain(customChain) {
|
|
46
|
-
|
|
78
|
+
// Null-prototype, because both the keys written here and the keys read out of
|
|
79
|
+
// it are caller-controlled. On a plain object, a `customChain` entry named
|
|
80
|
+
// `__proto__` reassigns this object's prototype instead of adding a row, and
|
|
81
|
+
// a lookup for `constructor` returns `Object.prototype.constructor`, a
|
|
82
|
+
// truthy non-array whose `.length` is 1, so the emptiness check passes and
|
|
83
|
+
// the `for...of` below throws `targets is not iterable` inside the request
|
|
84
|
+
// path.
|
|
85
|
+
const normalized = Object.create(null);
|
|
47
86
|
for (const [key, values] of Object.entries(DEFAULT_UNSUPPORTED_CODEX_FALLBACK_CHAIN)) {
|
|
48
87
|
const normalizedKey = canonicalizeModelName(key);
|
|
49
88
|
if (!normalizedKey)
|
|
@@ -158,7 +197,9 @@ export function resolveUnsupportedCodexFallbackModel(options) {
|
|
|
158
197
|
}
|
|
159
198
|
const chain = normalizeFallbackChain(options.customChain);
|
|
160
199
|
const targets = chain[currentModel] ?? [];
|
|
161
|
-
|
|
200
|
+
// Belt and braces with the null-prototype chain above: a `customChain` the
|
|
201
|
+
// caller passed straight through could still carry a non-array value.
|
|
202
|
+
if (!Array.isArray(targets) || targets.length === 0)
|
|
162
203
|
return undefined;
|
|
163
204
|
for (const target of targets) {
|
|
164
205
|
if (!options.fallbackToGpt52OnUnsupportedGpt53 &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-map.d.ts","sourceRoot":"","sources":["../../../../lib/request/helpers/model-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EACX,oBAAoB,EACpB,mBAAmB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAC1B,aAAa,GACb,WAAW,GACX,OAAO,GACP,SAAS,GACT,SAAS,CAAC;AAEb;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAMvC,CAAC;AAEX,MAAM,WAAW,iBAAiB;IACjC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;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jD,eAAO,MAAM,uBAAuB,iGAO1B,CAAC;AAoIX;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CA+I9C,CAAC;AAEX,QAAA,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,CAAC;AAgI7C,OAAO,EAAE,SAAS,EAAE,CAAC;AAqOrB;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQtE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAuCxE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,CAavE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAEjF;AAeD;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,GACvB,mBAAmB,CASrB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -60,6 +60,13 @@ export const DEFAULT_MODEL = "gpt-5.5";
|
|
|
60
60
|
// actual request routing and the legacy `gpt-5` alias remain opt-in per 2.5.0.
|
|
61
61
|
// Bare `gpt-5.6` aliases to Sol; we pin the canonical id so the probe display
|
|
62
62
|
// and report `modelSelection` read `gpt-5.6-sol` without a remap arrow.
|
|
63
|
+
//
|
|
64
|
+
// GPT-6 Astra deliberately does NOT lead the probe as of its 2026-09-03 launch.
|
|
65
|
+
// A probe only needs a response's quota headers, and Astra is still rolling out
|
|
66
|
+
// org by org, so leading with it would spend one failed request per probe for
|
|
67
|
+
// every account without entitlement yet and buy nothing. Move DEFAULT_PROBE_MODEL
|
|
68
|
+
// to `gpt-6-astra` once it is broadly available, and put `gpt-5.6-sol` directly
|
|
69
|
+
// behind it in QUOTA_PROBE_MODEL_CHAIN.
|
|
63
70
|
export const DEFAULT_PROBE_MODEL = "gpt-5.6-sol";
|
|
64
71
|
// Single source of truth for the live/quota probe fallback chain. Both the
|
|
65
72
|
// manager probe (lib/quota-probe.ts) and the runtime probe (lib/runtime/quota-probe.ts)
|
|
@@ -102,6 +109,57 @@ const GPT_5_6_LUNA_EFFORTS = [
|
|
|
102
109
|
"xhigh",
|
|
103
110
|
"max",
|
|
104
111
|
];
|
|
112
|
+
/**
|
|
113
|
+
* GPT-6 Astra, OpenAI's 2026-09-03 frontier release.
|
|
114
|
+
*
|
|
115
|
+
* There is no Sol/Terra/Luna split this generation: the announced lineup is the
|
|
116
|
+
* flagship plus `aeon`, a long-horizon variant built for runs measured in days.
|
|
117
|
+
* `gpt-6-astra` is the API model name OpenAI published at launch;
|
|
118
|
+
* `gpt-6-astra-aeon` is the second slug that shipped beside it in the Codex
|
|
119
|
+
* model list. "Astra Pro" is a plan tier, not a separate slug we have seen, so
|
|
120
|
+
* it is deliberately not registered as its own canonical model — the GPT-6
|
|
121
|
+
* resolver below claims `gpt-6-astra-pro` and every other unrecognised GPT-6 id
|
|
122
|
+
* for the flagship rather than letting it fall through to GPT-5.5.
|
|
123
|
+
*/
|
|
124
|
+
const GPT_6_ASTRA_MODEL = "gpt-6-astra";
|
|
125
|
+
const GPT_6_ASTRA_AEON_MODEL = "gpt-6-astra-aeon";
|
|
126
|
+
/** Bare `gpt-6` resolves to the flagship, mirroring bare `gpt-5.6` -> Sol. */
|
|
127
|
+
const GPT_6_FLAGSHIP_ALIAS = "gpt-6";
|
|
128
|
+
/**
|
|
129
|
+
* Astra inherits the GPT-5.6 frontier effort ladder: no `none`/`minimal`, and
|
|
130
|
+
* `ultra` at the top. OpenAI has published no default effort for Astra, so the
|
|
131
|
+
* flagship follows the tier it succeeds (Sol, `low`) and the long-horizon
|
|
132
|
+
* variant follows the catalog's other long-running models (`medium`).
|
|
133
|
+
*/
|
|
134
|
+
const GPT_6_ASTRA_EFFORTS = [
|
|
135
|
+
"low",
|
|
136
|
+
"medium",
|
|
137
|
+
"high",
|
|
138
|
+
"xhigh",
|
|
139
|
+
"max",
|
|
140
|
+
"ultra",
|
|
141
|
+
];
|
|
142
|
+
/**
|
|
143
|
+
* Cyber-specialty models from the upstream Codex catalog
|
|
144
|
+
* (openai/codex `codex-rs/models-manager/models.json`).
|
|
145
|
+
*
|
|
146
|
+
* They are hidden in the Codex picker and gated behind the Daybreak program,
|
|
147
|
+
* but the catalog marks them `supported_in_api`, so a client can and does name
|
|
148
|
+
* them. Until now every `gpt-daybreak-*` id missed the codex resolver (no
|
|
149
|
+
* `codex` token) and the general GPT-5 resolver (no `gpt 5` tokens) and landed
|
|
150
|
+
* on `DEFAULT_MODEL` — asking for the cyber-permissive model silently ran
|
|
151
|
+
* GPT-5.5. Reasoning ladders and defaults below are the catalog's own values.
|
|
152
|
+
*/
|
|
153
|
+
const DAYBREAK_BLUE_MODEL = "gpt-daybreak-blue-latest";
|
|
154
|
+
const DAYBREAK_RED_MODEL = "gpt-daybreak-red-latest";
|
|
155
|
+
const DAYBREAK_EFFORTS = [
|
|
156
|
+
"low",
|
|
157
|
+
"medium",
|
|
158
|
+
"high",
|
|
159
|
+
"xhigh",
|
|
160
|
+
"max",
|
|
161
|
+
"ultra",
|
|
162
|
+
];
|
|
105
163
|
const GPT_5_5_CANONICAL_MODEL = "gpt-5.5";
|
|
106
164
|
const GPT_5_5_PRO_CANONICAL_MODEL = "gpt-5.5-pro";
|
|
107
165
|
const GPT_5_5_RELEASE_MODEL = "gpt-5.5-2026-04-23";
|
|
@@ -180,6 +238,40 @@ export const MODEL_PROFILES = {
|
|
|
180
238
|
supportedReasoningEfforts: ["medium"],
|
|
181
239
|
capabilities: TOOL_CAPABILITIES.compactOnly,
|
|
182
240
|
},
|
|
241
|
+
// Like GPT-5.6, GPT-6 Astra ships its base instructions inline in the
|
|
242
|
+
// upstream model catalog rather than as a `gpt_6_prompt.md`, so it stays on
|
|
243
|
+
// the GPT-5.2 prompt family with every other post-5.2 general model. Adding
|
|
244
|
+
// a `gpt-6` prompt family here would also widen MODEL_FAMILIES, which is a
|
|
245
|
+
// persisted key space (`activeIndexByFamily`) and would need a storage
|
|
246
|
+
// migration to grow.
|
|
247
|
+
[GPT_6_ASTRA_MODEL]: {
|
|
248
|
+
normalizedModel: GPT_6_ASTRA_MODEL,
|
|
249
|
+
promptFamily: "gpt-5.2",
|
|
250
|
+
defaultReasoningEffort: "low",
|
|
251
|
+
supportedReasoningEfforts: GPT_6_ASTRA_EFFORTS,
|
|
252
|
+
capabilities: TOOL_CAPABILITIES.full,
|
|
253
|
+
},
|
|
254
|
+
[GPT_6_ASTRA_AEON_MODEL]: {
|
|
255
|
+
normalizedModel: GPT_6_ASTRA_AEON_MODEL,
|
|
256
|
+
promptFamily: "gpt-5.2",
|
|
257
|
+
defaultReasoningEffort: "medium",
|
|
258
|
+
supportedReasoningEfforts: GPT_6_ASTRA_EFFORTS,
|
|
259
|
+
capabilities: TOOL_CAPABILITIES.full,
|
|
260
|
+
},
|
|
261
|
+
[DAYBREAK_BLUE_MODEL]: {
|
|
262
|
+
normalizedModel: DAYBREAK_BLUE_MODEL,
|
|
263
|
+
promptFamily: "gpt-5.2",
|
|
264
|
+
defaultReasoningEffort: "low",
|
|
265
|
+
supportedReasoningEfforts: DAYBREAK_EFFORTS,
|
|
266
|
+
capabilities: TOOL_CAPABILITIES.full,
|
|
267
|
+
},
|
|
268
|
+
[DAYBREAK_RED_MODEL]: {
|
|
269
|
+
normalizedModel: DAYBREAK_RED_MODEL,
|
|
270
|
+
promptFamily: "gpt-5.2",
|
|
271
|
+
defaultReasoningEffort: "medium",
|
|
272
|
+
supportedReasoningEfforts: DAYBREAK_EFFORTS,
|
|
273
|
+
capabilities: TOOL_CAPABILITIES.full,
|
|
274
|
+
},
|
|
183
275
|
// GPT-5.6 ships its base instructions inline in the upstream model catalog
|
|
184
276
|
// rather than as a `gpt_5_6_prompt.md`, so these stay on the GPT-5.2 prompt
|
|
185
277
|
// family alongside the other post-5.2 general models.
|
|
@@ -282,6 +374,21 @@ function addGpt56Aliases() {
|
|
|
282
374
|
addEffortAliases(GPT_5_6_LUNA_MODEL, GPT_5_6_LUNA_MODEL, GPT_5_6_LUNA_EFFORTS);
|
|
283
375
|
addEffortAliases(GPT_5_6_FLAGSHIP_ALIAS, GPT_5_6_SOL_MODEL, GPT_5_6_SOL_TERRA_EFFORTS);
|
|
284
376
|
}
|
|
377
|
+
function addGpt6Aliases() {
|
|
378
|
+
addEffortAliases(GPT_6_ASTRA_MODEL, GPT_6_ASTRA_MODEL, GPT_6_ASTRA_EFFORTS);
|
|
379
|
+
addEffortAliases(GPT_6_ASTRA_AEON_MODEL, GPT_6_ASTRA_AEON_MODEL, GPT_6_ASTRA_EFFORTS);
|
|
380
|
+
addEffortAliases(GPT_6_FLAGSHIP_ALIAS, GPT_6_ASTRA_MODEL, GPT_6_ASTRA_EFFORTS);
|
|
381
|
+
// `astra` on its own is how the model is spoken about everywhere; accept it
|
|
382
|
+
// rather than letting it fall through to GPT-5.5.
|
|
383
|
+
addEffortAliases("astra", GPT_6_ASTRA_MODEL, GPT_6_ASTRA_EFFORTS);
|
|
384
|
+
addEffortAliases("astra-aeon", GPT_6_ASTRA_AEON_MODEL, GPT_6_ASTRA_EFFORTS);
|
|
385
|
+
}
|
|
386
|
+
function addDaybreakAliases() {
|
|
387
|
+
addEffortAliases(DAYBREAK_BLUE_MODEL, DAYBREAK_BLUE_MODEL, DAYBREAK_EFFORTS);
|
|
388
|
+
addEffortAliases(DAYBREAK_RED_MODEL, DAYBREAK_RED_MODEL, DAYBREAK_EFFORTS);
|
|
389
|
+
addEffortAliases("daybreak-blue", DAYBREAK_BLUE_MODEL, DAYBREAK_EFFORTS);
|
|
390
|
+
addEffortAliases("daybreak-red", DAYBREAK_RED_MODEL, DAYBREAK_EFFORTS);
|
|
391
|
+
}
|
|
285
392
|
function addGeneralAliases() {
|
|
286
393
|
addReasoningAliases(GPT_5_5_CANONICAL_MODEL, GPT_5_5_CANONICAL_MODEL);
|
|
287
394
|
addReasoningAliases(GPT_5_5_RELEASE_MODEL, GPT_5_5_CANONICAL_MODEL);
|
|
@@ -320,6 +427,8 @@ function addCodexAliases() {
|
|
|
320
427
|
addCodexAliases();
|
|
321
428
|
addGeneralAliases();
|
|
322
429
|
addGpt56Aliases();
|
|
430
|
+
addGpt6Aliases();
|
|
431
|
+
addDaybreakAliases();
|
|
323
432
|
export { MODEL_MAP };
|
|
324
433
|
function stripProviderPrefix(modelId) {
|
|
325
434
|
return modelId.includes("/") ? (modelId.split("/").pop() ?? modelId) : modelId;
|
|
@@ -395,6 +504,68 @@ function resolveCodexCatalogModel(modelId) {
|
|
|
395
504
|
* model than the caller asked for. Unrecognised tiers resolve to Sol, matching
|
|
396
505
|
* OpenAI's bare `gpt-5.6` alias.
|
|
397
506
|
*/
|
|
507
|
+
/**
|
|
508
|
+
* Resolve GPT-6 identifiers that are not exact aliases — a dated snapshot id
|
|
509
|
+
* (`gpt-6-astra-2026-09-03`), the "Astra Pro" plan tier (`gpt-6-astra-pro`), or
|
|
510
|
+
* any tier name OpenAI adds after this file was written.
|
|
511
|
+
*
|
|
512
|
+
* This is the same guard the 5.6 resolver exists for, one major version up:
|
|
513
|
+
* without it, `resolveGeneralGpt5CatalogModel` never matches (it requires a
|
|
514
|
+
* `gpt 5` token pair) and every unrecognised GPT-6 id lands on `DEFAULT_MODEL`,
|
|
515
|
+
* running GPT-5.5 for a caller who asked for the frontier model. `aeon` keeps
|
|
516
|
+
* its own canonical id because it is a behaviourally different model (long
|
|
517
|
+
* horizon), not a rename of the flagship; everything else resolves to the
|
|
518
|
+
* flagship, matching OpenAI's bare `gpt-6` alias.
|
|
519
|
+
*
|
|
520
|
+
* Ids carrying a `codex` token are left to `resolveCodexCatalogModel`, exactly
|
|
521
|
+
* as the 5.6 resolver defers them.
|
|
522
|
+
*/
|
|
523
|
+
function resolveGpt6CatalogModel(modelId) {
|
|
524
|
+
const tokens = tokenizeModelId(modelId);
|
|
525
|
+
const gptIndex = tokens.indexOf("gpt");
|
|
526
|
+
const versionToken = gptIndex === -1 ? undefined : tokens[gptIndex + 1];
|
|
527
|
+
// `gpt6` with no separator tokenizes as ONE token, so the `gpt` + `6` pair
|
|
528
|
+
// never forms and it used to fall through to GPT-5.5 while still passing
|
|
529
|
+
// capability-policy's catalog gate. Gate and resolver have to agree on the
|
|
530
|
+
// same id or the policy store keys state a request never reads.
|
|
531
|
+
const isGpt6 = versionToken === "6" || tokens.includes("gpt6");
|
|
532
|
+
// A bare `astra` token counts too. OpenAI's own launch material and every
|
|
533
|
+
// picker label say "Astra" without the `gpt-6` prefix, so `Astra Pro` and
|
|
534
|
+
// `astra-fast` reach this resolver with no version tokens at all; without
|
|
535
|
+
// this clause they miss every branch and land on GPT-5.5.
|
|
536
|
+
//
|
|
537
|
+
// It is anchored, not a free-floating substring: an id that names a
|
|
538
|
+
// DIFFERENT GPT major version does not get claimed for the frontier model
|
|
539
|
+
// just because `astra` appears in it, so `gpt-4-astra-x` is declined here
|
|
540
|
+
// rather than silently running GPT-6.
|
|
541
|
+
const namesOtherGptVersion = versionToken !== undefined &&
|
|
542
|
+
/^\d+$/.test(versionToken) &&
|
|
543
|
+
versionToken !== "6";
|
|
544
|
+
const isAstra = tokens.includes("astra") && !namesOtherGptVersion;
|
|
545
|
+
if ((!isGpt6 && !isAstra) || tokens.includes("codex")) {
|
|
546
|
+
return undefined;
|
|
547
|
+
}
|
|
548
|
+
if (tokens.includes("aeon"))
|
|
549
|
+
return GPT_6_ASTRA_AEON_MODEL;
|
|
550
|
+
return GPT_6_ASTRA_MODEL;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Resolve the Daybreak cyber models, including ids that are not exact aliases
|
|
554
|
+
* (a pinned `gpt-daybreak-red-2026-08-14`, say).
|
|
555
|
+
*
|
|
556
|
+
* `red` is the cyber-permissive variant and `blue` the defensive one; an
|
|
557
|
+
* unrecognised Daybreak id resolves to `blue`, the more restricted of the two,
|
|
558
|
+
* so a typo cannot silently upgrade a caller into the permissive model.
|
|
559
|
+
*/
|
|
560
|
+
function resolveDaybreakCatalogModel(modelId) {
|
|
561
|
+
const tokens = tokenizeModelId(modelId);
|
|
562
|
+
if (!tokens.includes("daybreak")) {
|
|
563
|
+
return undefined;
|
|
564
|
+
}
|
|
565
|
+
if (tokens.includes("red"))
|
|
566
|
+
return DAYBREAK_RED_MODEL;
|
|
567
|
+
return DAYBREAK_BLUE_MODEL;
|
|
568
|
+
}
|
|
398
569
|
function resolveGpt56CatalogModel(modelId) {
|
|
399
570
|
const tokens = tokenizeModelId(modelId);
|
|
400
571
|
const gptIndex = tokens.indexOf("gpt");
|
|
@@ -476,10 +647,20 @@ export function resolveNormalizedModel(model) {
|
|
|
476
647
|
if (mappedModel) {
|
|
477
648
|
return mappedModel;
|
|
478
649
|
}
|
|
650
|
+
// Daybreak first: its slugs carry neither a `codex` nor a `gpt 5` token, so
|
|
651
|
+
// every other resolver declines them and they would reach DEFAULT_MODEL.
|
|
652
|
+
const daybreakCatalogModel = resolveDaybreakCatalogModel(modelId);
|
|
653
|
+
if (daybreakCatalogModel) {
|
|
654
|
+
return daybreakCatalogModel;
|
|
655
|
+
}
|
|
479
656
|
const codexCatalogModel = resolveCodexCatalogModel(modelId);
|
|
480
657
|
if (codexCatalogModel) {
|
|
481
658
|
return codexCatalogModel;
|
|
482
659
|
}
|
|
660
|
+
const gpt6CatalogModel = resolveGpt6CatalogModel(modelId);
|
|
661
|
+
if (gpt6CatalogModel) {
|
|
662
|
+
return gpt6CatalogModel;
|
|
663
|
+
}
|
|
483
664
|
const gpt56CatalogModel = resolveGpt56CatalogModel(modelId);
|
|
484
665
|
if (gpt56CatalogModel) {
|
|
485
666
|
return gpt56CatalogModel;
|
|
@@ -19,7 +19,7 @@ export interface UsageModelPricing {
|
|
|
19
19
|
* `test/usage-pricing-coverage.test.ts` fails if a NEW routable model appears
|
|
20
20
|
* in neither list.
|
|
21
21
|
*/
|
|
22
|
-
export declare const UNPRICED_ROUTABLE_MODELS: readonly ["gpt-5.1", "gpt-5.2-pro", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.4-pro", "gpt-5.5-pro", "gpt-5-mini", "gpt-5-nano"];
|
|
22
|
+
export declare const UNPRICED_ROUTABLE_MODELS: readonly ["gpt-6-astra-aeon", "gpt-daybreak-blue-latest", "gpt-daybreak-red-latest", "gpt-5.1", "gpt-5.2-pro", "gpt-5.4-mini", "gpt-5.4-nano", "gpt-5.4-pro", "gpt-5.5-pro", "gpt-5-mini", "gpt-5-nano"];
|
|
23
23
|
export declare function getUsageModelPricing(model: string | null | undefined): UsageModelPricing | null;
|
|
24
24
|
export declare function estimateUsageCostUsd(model: string | null | undefined, tokens: UsageTokenCounts): number | null;
|
|
25
25
|
export declare function listUsageModelPricing(): Record<string, UsageModelPricing>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../../lib/usage/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IACjC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../../lib/usage/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IACjC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,sBAAsB,CAAC,EAAE,MAAM,CAAC;CAChC;AAwED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,0MAkB3B,CAAC;AAOX,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC9B,iBAAiB,GAAG,IAAI,CAiB1B;AAED,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,MAAM,EAAE,gBAAgB,GACtB,MAAM,GAAG,IAAI,CAqBf;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAEzE"}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
const MODEL_PRICING = {
|
|
2
|
+
// GPT-6 Astra, published at the 2026-09-03 launch: $10 / 1M input,
|
|
3
|
+
// $50 / 1M output on the standard service tier. Fast mode is 2x standard
|
|
4
|
+
// ($20 / $100); this table has no service-tier dimension, so it prices the
|
|
5
|
+
// standard tier and a Fast-mode session is under-counted by half. No cached
|
|
6
|
+
// input rate was published, so `cachedInputUsdPerMillion` is deliberately
|
|
7
|
+
// absent: `estimateUsageCostUsd` then bills cached tokens at the full input
|
|
8
|
+
// rate, which over-states cost. That is the safe direction for a
|
|
9
|
+
// `maxCostUsd` budget — it trips early, never late.
|
|
10
|
+
"gpt-6-astra": {
|
|
11
|
+
inputUsdPerMillion: 10,
|
|
12
|
+
outputUsdPerMillion: 50,
|
|
13
|
+
reasoningUsdPerMillion: 50,
|
|
14
|
+
},
|
|
2
15
|
"gpt-5-codex": {
|
|
3
16
|
inputUsdPerMillion: 1.25,
|
|
4
17
|
outputUsdPerMillion: 10,
|
|
@@ -69,6 +82,15 @@ const MODEL_PRICING = {
|
|
|
69
82
|
* in neither list.
|
|
70
83
|
*/
|
|
71
84
|
export const UNPRICED_ROUTABLE_MODELS = [
|
|
85
|
+
// OpenAI published a rate for the Astra flagship at launch but not for the
|
|
86
|
+
// long-horizon `aeon` variant, and the Daybreak cyber models are sold under
|
|
87
|
+
// a separate controlled-access agreement with no public per-token rate.
|
|
88
|
+
// Pricing `aeon` off the flagship would be a guess on the model whose whole
|
|
89
|
+
// purpose is running for days, which is exactly where a wrong rate does the
|
|
90
|
+
// most damage.
|
|
91
|
+
"gpt-6-astra-aeon",
|
|
92
|
+
"gpt-daybreak-blue-latest",
|
|
93
|
+
"gpt-daybreak-red-latest",
|
|
72
94
|
"gpt-5.1",
|
|
73
95
|
"gpt-5.2-pro",
|
|
74
96
|
"gpt-5.4-mini",
|
|
@@ -87,6 +109,17 @@ export function getUsageModelPricing(model) {
|
|
|
87
109
|
if (!normalized) {
|
|
88
110
|
return null;
|
|
89
111
|
}
|
|
112
|
+
// `Object.hasOwn`, not a bare index. The model string arrives raw from the
|
|
113
|
+
// client (`createUsageLedgerRow` only trims it), so `constructor`,
|
|
114
|
+
// `toString` and friends reach this lookup and a bare index hands back the
|
|
115
|
+
// matching `Object.prototype` member. That object is truthy, so it is
|
|
116
|
+
// returned as a rate, and every field on it is undefined: the cost comes out
|
|
117
|
+
// `NaN` instead of `null`. A NaN cost is worse than an unknown one, because
|
|
118
|
+
// `NaN >= limit` is false, so it silently makes a `maxCostUsd` budget
|
|
119
|
+
// unenforceable rather than failing closed the way an unpriced model does.
|
|
120
|
+
if (!Object.hasOwn(MODEL_PRICING, normalized)) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
90
123
|
return MODEL_PRICING[normalized] ?? null;
|
|
91
124
|
}
|
|
92
125
|
export function estimateUsageCostUsd(model, tokens) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-multi-auth",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Codex CLI multi-account OAuth manager with account switching, health checks, runtime rotation, diagnostics, and recovery tools for @openai/codex",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
package/scripts/codex.js
CHANGED
|
@@ -574,7 +574,27 @@ async function applyForcedAccountSelection(rawArgs, env = process.env) {
|
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
function resolveModelFamilyForStatus(model) {
|
|
577
|
-
|
|
577
|
+
// `resolveStatusModel` hands over the raw `--model` / `-m` value or the
|
|
578
|
+
// config value verbatim, so a provider-qualified id arrives intact. Every
|
|
579
|
+
// branch below is a `startsWith`, so `openai/gpt-6` used to match none of
|
|
580
|
+
// them and return null, dropping status routing back to `activeIndex`
|
|
581
|
+
// instead of the family index. Strip the prefix once, for all of them.
|
|
582
|
+
const normalized =
|
|
583
|
+
typeof model === "string"
|
|
584
|
+
? stripProviderPrefix(model.trim()).toLowerCase()
|
|
585
|
+
: "";
|
|
586
|
+
// GPT-6 Astra and the Daybreak cyber models share the gpt-5.2 prompt family
|
|
587
|
+
// with the GPT-5.6 general tiers (see lib/request/helpers/model-map.ts
|
|
588
|
+
// MODEL_PROFILES). Daybreak has to be checked explicitly: its slug matches
|
|
589
|
+
// none of the branches below, so it used to fall through to `null` and get
|
|
590
|
+
// bucketed against no family at all.
|
|
591
|
+
if (
|
|
592
|
+
(normalized.startsWith("gpt-6") || normalized.startsWith("astra")) &&
|
|
593
|
+
!normalized.includes("codex")
|
|
594
|
+
) {
|
|
595
|
+
return "gpt-5.2";
|
|
596
|
+
}
|
|
597
|
+
if (normalized.includes("daybreak")) return "gpt-5.2";
|
|
578
598
|
// GPT-5.6 general tiers share the gpt-5.2 prompt family (see
|
|
579
599
|
// lib/request/helpers/model-map.ts MODEL_PROFILES). Check before the generic
|
|
580
600
|
// gpt-5 catch-all, which would otherwise mis-bucket them as codex.
|
|
@@ -1259,7 +1279,18 @@ const DIRECT_UNSUPPORTED_MODEL_PATTERN =
|
|
|
1259
1279
|
/['"]([^'"]+)['"]\s+model is not supported when using codex with a chatgpt account/i;
|
|
1260
1280
|
const CURRENT_CODEX_MODEL = "gpt-5.3-codex";
|
|
1261
1281
|
const LEGACY_CODEX_MODEL = "gpt-5-codex";
|
|
1282
|
+
// Mirrors the GPT-6 rows of lib/request/error-classification.ts
|
|
1283
|
+
// `DEFAULT_UNSUPPORTED_CODEX_FALLBACK_CHAIN`. This table is walked differently
|
|
1284
|
+
// from lib's: `resolveUnsupportedModelRetryTarget` keys on the model named in
|
|
1285
|
+
// the error output and falls back to the original requested model, with
|
|
1286
|
+
// `attemptedModels` accumulating, so a row's later entries ARE reachable here.
|
|
1287
|
+
// The two tables are not identical today (`gpt-5.3-codex` has a row in lib and
|
|
1288
|
+
// not here), which predates GPT-6 and is left alone; the GPT-6 rows are pinned
|
|
1289
|
+
// in parity by test/codex-model-resolution.test.ts.
|
|
1262
1290
|
const WRAPPER_UNSUPPORTED_MODEL_FALLBACK_CHAIN = {
|
|
1291
|
+
"gpt-6-astra": ["gpt-5.6-sol", "gpt-5.5"],
|
|
1292
|
+
"gpt-6-astra-aeon": ["gpt-6-astra", "gpt-5.6-sol"],
|
|
1293
|
+
"gpt-5.6-sol": ["gpt-5.5"],
|
|
1263
1294
|
"gpt-5": ["gpt-5.5"],
|
|
1264
1295
|
"gpt-5-pro": ["gpt-5.5-pro"],
|
|
1265
1296
|
"gpt-5-chat-latest": ["gpt-5.5"],
|
|
@@ -1901,6 +1932,10 @@ function hasCliAuthCredentialsStoreOverride(args) {
|
|
|
1901
1932
|
// This wrapper runs before the TypeScript build, so it cannot import that source.
|
|
1902
1933
|
const SUPPORTED_REASONING_EFFORTS_BY_MODEL = {
|
|
1903
1934
|
[CURRENT_CODEX_MODEL]: ["low", "medium", "high", "xhigh"],
|
|
1935
|
+
"gpt-6-astra": ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
1936
|
+
"gpt-6-astra-aeon": ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
1937
|
+
"gpt-daybreak-blue-latest": ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
1938
|
+
"gpt-daybreak-red-latest": ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
1904
1939
|
"gpt-5.6-sol": ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
1905
1940
|
"gpt-5.6-terra": ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
1906
1941
|
"gpt-5.6-luna": ["low", "medium", "high", "xhigh", "max"],
|
|
@@ -1960,6 +1995,18 @@ const GPT_5_6_LUNA_MODEL = "gpt-5.6-luna";
|
|
|
1960
1995
|
const GPT_5_6_FLAGSHIP_ALIAS = "gpt-5.6";
|
|
1961
1996
|
const GPT_5_6_SOL_TERRA_EFFORTS = ["low", "medium", "high", "xhigh", "max", "ultra"];
|
|
1962
1997
|
const GPT_5_6_LUNA_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
|
|
1998
|
+
// GPT-6 Astra (2026-09-03). No Sol/Terra/Luna split this generation: the
|
|
1999
|
+
// flagship plus `aeon`, a long-horizon variant. Same frontier effort ladder as
|
|
2000
|
+
// 5.6 (no `none`/`minimal`, `ultra` at the top). Bare `gpt-6` -> flagship.
|
|
2001
|
+
const GPT_6_ASTRA_MODEL = "gpt-6-astra";
|
|
2002
|
+
const GPT_6_ASTRA_AEON_MODEL = "gpt-6-astra-aeon";
|
|
2003
|
+
const GPT_6_FLAGSHIP_ALIAS = "gpt-6";
|
|
2004
|
+
const GPT_6_ASTRA_EFFORTS = ["low", "medium", "high", "xhigh", "max", "ultra"];
|
|
2005
|
+
// Daybreak cyber models from the upstream Codex catalog. `red` is the
|
|
2006
|
+
// cyber-permissive variant, `blue` the defensive one.
|
|
2007
|
+
const DAYBREAK_BLUE_MODEL = "gpt-daybreak-blue-latest";
|
|
2008
|
+
const DAYBREAK_RED_MODEL = "gpt-daybreak-red-latest";
|
|
2009
|
+
const DAYBREAK_EFFORTS = ["low", "medium", "high", "xhigh", "max", "ultra"];
|
|
1963
2010
|
const GENERAL_GPT5_VERSION_CATALOG = {
|
|
1964
2011
|
1: {
|
|
1965
2012
|
base: "gpt-5.1",
|
|
@@ -2163,6 +2210,47 @@ function seedRequestedModelAliases() {
|
|
|
2163
2210
|
GPT_5_6_SOL_MODEL,
|
|
2164
2211
|
GPT_5_6_SOL_TERRA_EFFORTS,
|
|
2165
2212
|
);
|
|
2213
|
+
addRequestedModelEffortAliases(
|
|
2214
|
+
GPT_6_ASTRA_MODEL,
|
|
2215
|
+
GPT_6_ASTRA_MODEL,
|
|
2216
|
+
GPT_6_ASTRA_EFFORTS,
|
|
2217
|
+
);
|
|
2218
|
+
addRequestedModelEffortAliases(
|
|
2219
|
+
GPT_6_ASTRA_AEON_MODEL,
|
|
2220
|
+
GPT_6_ASTRA_AEON_MODEL,
|
|
2221
|
+
GPT_6_ASTRA_EFFORTS,
|
|
2222
|
+
);
|
|
2223
|
+
addRequestedModelEffortAliases(
|
|
2224
|
+
GPT_6_FLAGSHIP_ALIAS,
|
|
2225
|
+
GPT_6_ASTRA_MODEL,
|
|
2226
|
+
GPT_6_ASTRA_EFFORTS,
|
|
2227
|
+
);
|
|
2228
|
+
addRequestedModelEffortAliases("astra", GPT_6_ASTRA_MODEL, GPT_6_ASTRA_EFFORTS);
|
|
2229
|
+
addRequestedModelEffortAliases(
|
|
2230
|
+
"astra-aeon",
|
|
2231
|
+
GPT_6_ASTRA_AEON_MODEL,
|
|
2232
|
+
GPT_6_ASTRA_EFFORTS,
|
|
2233
|
+
);
|
|
2234
|
+
addRequestedModelEffortAliases(
|
|
2235
|
+
DAYBREAK_BLUE_MODEL,
|
|
2236
|
+
DAYBREAK_BLUE_MODEL,
|
|
2237
|
+
DAYBREAK_EFFORTS,
|
|
2238
|
+
);
|
|
2239
|
+
addRequestedModelEffortAliases(
|
|
2240
|
+
DAYBREAK_RED_MODEL,
|
|
2241
|
+
DAYBREAK_RED_MODEL,
|
|
2242
|
+
DAYBREAK_EFFORTS,
|
|
2243
|
+
);
|
|
2244
|
+
addRequestedModelEffortAliases(
|
|
2245
|
+
"daybreak-blue",
|
|
2246
|
+
DAYBREAK_BLUE_MODEL,
|
|
2247
|
+
DAYBREAK_EFFORTS,
|
|
2248
|
+
);
|
|
2249
|
+
addRequestedModelEffortAliases(
|
|
2250
|
+
"daybreak-red",
|
|
2251
|
+
DAYBREAK_RED_MODEL,
|
|
2252
|
+
DAYBREAK_EFFORTS,
|
|
2253
|
+
);
|
|
2166
2254
|
addRequestedModelReasoningAliases(CURRENT_CODEX_MODEL, CURRENT_CODEX_MODEL);
|
|
2167
2255
|
addRequestedModelReasoningAliases("gpt-5.3-codex-spark", CURRENT_CODEX_MODEL);
|
|
2168
2256
|
addRequestedModelReasoningAliases(LEGACY_CODEX_MODEL, CURRENT_CODEX_MODEL);
|
|
@@ -2218,6 +2306,13 @@ function resolveStableGeneralGpt5Variant(variant) {
|
|
|
2218
2306
|
return fallback;
|
|
2219
2307
|
}
|
|
2220
2308
|
|
|
2309
|
+
// The final clause is a catch-all on the `codex` substring, matching
|
|
2310
|
+
// `resolveCodexCatalogModel` in lib/request/helpers/model-map.ts. It used to be
|
|
2311
|
+
// an exact `normalized === "codex"` check, so any codex id the explicit list
|
|
2312
|
+
// above did not name (`gpt-6-codex`, `gpt-5.7-codex`, …) resolved to nothing in
|
|
2313
|
+
// the wrapper while lib resolved it to the current codex model — a silent drift
|
|
2314
|
+
// between the two, which is exactly what test/codex-model-resolution.test.ts
|
|
2315
|
+
// exists to prevent.
|
|
2221
2316
|
function resolveCodexRequestedModel(normalized) {
|
|
2222
2317
|
if (
|
|
2223
2318
|
normalized.includes("gpt-5.1-codex-max") ||
|
|
@@ -2246,7 +2341,7 @@ function resolveCodexRequestedModel(normalized) {
|
|
|
2246
2341
|
normalized.includes("gpt 5.1 codex") ||
|
|
2247
2342
|
normalized.includes("gpt-5-codex") ||
|
|
2248
2343
|
normalized.includes("gpt 5 codex") ||
|
|
2249
|
-
normalized
|
|
2344
|
+
normalized.includes("codex")
|
|
2250
2345
|
) {
|
|
2251
2346
|
return CURRENT_CODEX_MODEL;
|
|
2252
2347
|
}
|
|
@@ -2258,6 +2353,51 @@ function resolveCodexRequestedModel(normalized) {
|
|
|
2258
2353
|
// future `gpt-5.6-terra-fast`). Without this the general GPT-5 resolver sees
|
|
2259
2354
|
// minor `6`, finds no catalog entry, and silently falls back to 5.5. Unknown
|
|
2260
2355
|
// tiers resolve to Sol, matching OpenAI's bare `gpt-5.6` alias.
|
|
2356
|
+
// Resolve GPT-6 identifiers that are not exact aliases (a dated snapshot, the
|
|
2357
|
+
// `gpt-6-astra-pro` plan tier, or a tier OpenAI adds later). Without this the
|
|
2358
|
+
// general GPT-5 resolver never matches (it needs a `gpt 5` token pair) and the
|
|
2359
|
+
// id falls through to 5.5 — running GPT-5.5 for a caller who asked for the
|
|
2360
|
+
// frontier model. `aeon` keeps its own id because it is a behaviourally
|
|
2361
|
+
// different model, not a rename. Mirrors lib/request/helpers/model-map.ts.
|
|
2362
|
+
function resolveGpt6RequestedModel(stripped) {
|
|
2363
|
+
const tokens = tokenizeRequestedModel(stripped);
|
|
2364
|
+
const gptIndex = tokens.indexOf("gpt");
|
|
2365
|
+
// `gpt6` with no separator tokenizes as one token, so the `gpt` + `6` pair
|
|
2366
|
+
// never forms; mirror lib and claim it here.
|
|
2367
|
+
const versionToken = gptIndex === -1 ? undefined : tokens[gptIndex + 1];
|
|
2368
|
+
// `gpt6` with no separator tokenizes as one token, so the `gpt` + `6` pair
|
|
2369
|
+
// never forms; mirror lib and claim it here.
|
|
2370
|
+
const isGpt6 = versionToken === "6" || tokens.includes("gpt6");
|
|
2371
|
+
// A bare `astra` token counts too: picker labels and OpenAI's own material
|
|
2372
|
+
// say "Astra" with no `gpt-6` prefix, so `Astra Pro` arrives with no version
|
|
2373
|
+
// tokens and would otherwise miss every branch and land on 5.5. Anchored so
|
|
2374
|
+
// an id naming a different GPT major version, `gpt-4-astra-x`, is not
|
|
2375
|
+
// claimed for the frontier model.
|
|
2376
|
+
const namesOtherGptVersion =
|
|
2377
|
+
versionToken !== undefined &&
|
|
2378
|
+
/^\d+$/.test(versionToken) &&
|
|
2379
|
+
versionToken !== "6";
|
|
2380
|
+
const isAstra = tokens.includes("astra") && !namesOtherGptVersion;
|
|
2381
|
+
if ((!isGpt6 && !isAstra) || tokens.includes("codex")) {
|
|
2382
|
+
return "";
|
|
2383
|
+
}
|
|
2384
|
+
if (tokens.includes("aeon")) return GPT_6_ASTRA_AEON_MODEL;
|
|
2385
|
+
return GPT_6_ASTRA_MODEL;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
// Daybreak slugs carry neither a `codex` nor a `gpt 5` token, so every other
|
|
2389
|
+
// resolver declines them and they would reach the 5.5 default. An unrecognised
|
|
2390
|
+
// Daybreak id resolves to `blue`, the more restricted of the two, so a typo
|
|
2391
|
+
// cannot silently upgrade a caller into the cyber-permissive model.
|
|
2392
|
+
function resolveDaybreakRequestedModel(stripped) {
|
|
2393
|
+
const tokens = tokenizeRequestedModel(stripped);
|
|
2394
|
+
if (!tokens.includes("daybreak")) {
|
|
2395
|
+
return "";
|
|
2396
|
+
}
|
|
2397
|
+
if (tokens.includes("red")) return DAYBREAK_RED_MODEL;
|
|
2398
|
+
return DAYBREAK_BLUE_MODEL;
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2261
2401
|
function resolveGpt56RequestedModel(stripped) {
|
|
2262
2402
|
const tokens = tokenizeRequestedModel(stripped);
|
|
2263
2403
|
const gptIndex = tokens.indexOf("gpt");
|
|
@@ -2316,11 +2456,21 @@ function normalizeRequestedModel(model) {
|
|
|
2316
2456
|
return exactMatch;
|
|
2317
2457
|
}
|
|
2318
2458
|
|
|
2459
|
+
const daybreakModel = resolveDaybreakRequestedModel(stripped);
|
|
2460
|
+
if (daybreakModel) {
|
|
2461
|
+
return daybreakModel;
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2319
2464
|
const codexModel = resolveCodexRequestedModel(normalized);
|
|
2320
2465
|
if (codexModel) {
|
|
2321
2466
|
return codexModel;
|
|
2322
2467
|
}
|
|
2323
2468
|
|
|
2469
|
+
const gpt6Model = resolveGpt6RequestedModel(stripped);
|
|
2470
|
+
if (gpt6Model) {
|
|
2471
|
+
return gpt6Model;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2324
2474
|
const gpt56Model = resolveGpt56RequestedModel(stripped);
|
|
2325
2475
|
if (gpt56Model) {
|
|
2326
2476
|
return gpt56Model;
|
|
@@ -6240,6 +6390,7 @@ export {
|
|
|
6240
6390
|
coerceReasoningEffortForModel,
|
|
6241
6391
|
resolveModelFamilyForStatus,
|
|
6242
6392
|
canonicalizeRequestedModelName,
|
|
6393
|
+
WRAPPER_UNSUPPORTED_MODEL_FALLBACK_CHAIN,
|
|
6243
6394
|
};
|
|
6244
6395
|
|
|
6245
6396
|
// Run the wrapper only when actually launched (as the `codex-multi-auth-codex`
|