codex-multi-auth 2.0.1 → 2.0.2

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.
@@ -1,258 +1,258 @@
1
- {
2
- "$schema": "./schema/config.schema.json",
3
- "plugin": [
4
- "codex-multi-auth"
5
- ],
6
- "provider": {
7
- "openai": {
8
- "options": {
9
- "reasoningEffort": "medium",
10
- "reasoningSummary": "auto",
11
- "textVerbosity": "medium",
12
- "include": [
13
- "reasoning.encrypted_content"
14
- ],
15
- "store": false
16
- },
17
- "models": {
18
- "gpt-5.5": {
19
- "name": "GPT 5.5 (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
- "none": {
35
- "reasoningEffort": "none",
36
- "reasoningSummary": "auto",
37
- "textVerbosity": "medium"
38
- },
39
- "low": {
40
- "reasoningEffort": "low",
41
- "reasoningSummary": "auto",
42
- "textVerbosity": "medium"
43
- },
44
- "medium": {
45
- "reasoningEffort": "medium",
46
- "reasoningSummary": "auto",
47
- "textVerbosity": "medium"
48
- },
49
- "high": {
50
- "reasoningEffort": "high",
51
- "reasoningSummary": "detailed",
52
- "textVerbosity": "medium"
53
- },
54
- "xhigh": {
55
- "reasoningEffort": "xhigh",
56
- "reasoningSummary": "detailed",
57
- "textVerbosity": "medium"
58
- }
59
- }
60
- },
61
- "gpt-5.5-pro": {
62
- "name": "GPT 5.5 Pro (OAuth)",
63
- "limit": {
64
- "context": 272000,
65
- "output": 128000
66
- },
67
- "modalities": {
68
- "input": [
69
- "text",
70
- "image"
71
- ],
72
- "output": [
73
- "text"
74
- ]
75
- },
76
- "variants": {
77
- "medium": {
78
- "reasoningEffort": "medium",
79
- "reasoningSummary": "detailed",
80
- "textVerbosity": "medium"
81
- },
82
- "high": {
83
- "reasoningEffort": "high",
84
- "reasoningSummary": "detailed",
85
- "textVerbosity": "medium"
86
- },
87
- "xhigh": {
88
- "reasoningEffort": "xhigh",
89
- "reasoningSummary": "detailed",
90
- "textVerbosity": "medium"
91
- }
92
- }
93
- },
94
- "gpt-5.4": {
95
- "name": "GPT 5.4 (OAuth)",
96
- "limit": {
97
- "context": 272000,
98
- "output": 128000
99
- },
100
- "modalities": {
101
- "input": [
102
- "text",
103
- "image"
104
- ],
105
- "output": [
106
- "text"
107
- ]
108
- },
109
- "variants": {
110
- "none": {
111
- "reasoningEffort": "none",
112
- "reasoningSummary": "auto",
113
- "textVerbosity": "medium"
114
- },
115
- "low": {
116
- "reasoningEffort": "low",
117
- "reasoningSummary": "auto",
118
- "textVerbosity": "medium"
119
- },
120
- "medium": {
121
- "reasoningEffort": "medium",
122
- "reasoningSummary": "auto",
123
- "textVerbosity": "medium"
124
- },
125
- "high": {
126
- "reasoningEffort": "high",
127
- "reasoningSummary": "detailed",
128
- "textVerbosity": "medium"
129
- },
130
- "xhigh": {
131
- "reasoningEffort": "xhigh",
132
- "reasoningSummary": "detailed",
133
- "textVerbosity": "medium"
134
- }
135
- }
136
- },
137
- "gpt-5.4-pro": {
138
- "name": "GPT 5.4 Pro (OAuth)",
139
- "limit": {
140
- "context": 272000,
141
- "output": 128000
142
- },
143
- "modalities": {
144
- "input": [
145
- "text",
146
- "image"
147
- ],
148
- "output": [
149
- "text"
150
- ]
151
- },
152
- "variants": {
153
- "medium": {
154
- "reasoningEffort": "medium",
155
- "reasoningSummary": "detailed",
156
- "textVerbosity": "medium"
157
- },
158
- "high": {
159
- "reasoningEffort": "high",
160
- "reasoningSummary": "detailed",
161
- "textVerbosity": "medium"
162
- },
163
- "xhigh": {
164
- "reasoningEffort": "xhigh",
165
- "reasoningSummary": "detailed",
166
- "textVerbosity": "medium"
167
- }
168
- }
169
- },
170
- "gpt-5.4-mini": {
171
- "name": "GPT 5.4 Mini (OAuth)",
172
- "limit": {
173
- "context": 272000,
174
- "output": 128000
175
- },
176
- "modalities": {
177
- "input": [
178
- "text",
179
- "image"
180
- ],
181
- "output": [
182
- "text"
183
- ]
184
- },
185
- "options": {
186
- "reasoningEffort": "medium",
187
- "reasoningSummary": "auto",
188
- "textVerbosity": "medium"
189
- }
190
- },
191
- "gpt-5.4-nano": {
192
- "name": "GPT 5.4 Nano (OAuth)",
193
- "limit": {
194
- "context": 272000,
195
- "output": 128000
196
- },
197
- "modalities": {
198
- "input": [
199
- "text",
200
- "image"
201
- ],
202
- "output": [
203
- "text"
204
- ]
205
- },
206
- "options": {
207
- "reasoningEffort": "medium",
208
- "reasoningSummary": "auto",
209
- "textVerbosity": "medium"
210
- }
211
- },
212
- "gpt-5.3-codex": {
213
- "name": "GPT 5.3 Codex (OAuth)",
214
- "limit": {
215
- "context": 272000,
216
- "output": 128000
217
- },
218
- "modalities": {
219
- "input": [
220
- "text",
221
- "image"
222
- ],
223
- "output": [
224
- "text"
225
- ]
226
- },
227
- "variants": {
228
- "low": {
229
- "reasoningEffort": "low",
230
- "reasoningSummary": "auto",
231
- "textVerbosity": "medium"
232
- },
233
- "medium": {
234
- "reasoningEffort": "medium",
235
- "reasoningSummary": "auto",
236
- "textVerbosity": "medium"
237
- },
238
- "high": {
239
- "reasoningEffort": "high",
240
- "reasoningSummary": "detailed",
241
- "textVerbosity": "medium"
242
- },
243
- "xhigh": {
244
- "reasoningEffort": "xhigh",
245
- "reasoningSummary": "detailed",
246
- "textVerbosity": "medium"
247
- }
248
- },
249
- "options": {
250
- "reasoningEffort": "high",
251
- "reasoningSummary": "detailed",
252
- "textVerbosity": "medium"
253
- }
254
- }
255
- }
256
- }
257
- }
258
- }
1
+ {
2
+ "$schema": "./schema/config.schema.json",
3
+ "plugin": [
4
+ "codex-multi-auth"
5
+ ],
6
+ "provider": {
7
+ "openai": {
8
+ "options": {
9
+ "reasoningEffort": "medium",
10
+ "reasoningSummary": "auto",
11
+ "textVerbosity": "medium",
12
+ "include": [
13
+ "reasoning.encrypted_content"
14
+ ],
15
+ "store": false
16
+ },
17
+ "models": {
18
+ "gpt-5.5": {
19
+ "name": "GPT 5.5 (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
+ "none": {
35
+ "reasoningEffort": "none",
36
+ "reasoningSummary": "auto",
37
+ "textVerbosity": "medium"
38
+ },
39
+ "low": {
40
+ "reasoningEffort": "low",
41
+ "reasoningSummary": "auto",
42
+ "textVerbosity": "medium"
43
+ },
44
+ "medium": {
45
+ "reasoningEffort": "medium",
46
+ "reasoningSummary": "auto",
47
+ "textVerbosity": "medium"
48
+ },
49
+ "high": {
50
+ "reasoningEffort": "high",
51
+ "reasoningSummary": "detailed",
52
+ "textVerbosity": "medium"
53
+ },
54
+ "xhigh": {
55
+ "reasoningEffort": "xhigh",
56
+ "reasoningSummary": "detailed",
57
+ "textVerbosity": "medium"
58
+ }
59
+ }
60
+ },
61
+ "gpt-5.5-pro": {
62
+ "name": "GPT 5.5 Pro (OAuth)",
63
+ "limit": {
64
+ "context": 272000,
65
+ "output": 128000
66
+ },
67
+ "modalities": {
68
+ "input": [
69
+ "text",
70
+ "image"
71
+ ],
72
+ "output": [
73
+ "text"
74
+ ]
75
+ },
76
+ "variants": {
77
+ "medium": {
78
+ "reasoningEffort": "medium",
79
+ "reasoningSummary": "detailed",
80
+ "textVerbosity": "medium"
81
+ },
82
+ "high": {
83
+ "reasoningEffort": "high",
84
+ "reasoningSummary": "detailed",
85
+ "textVerbosity": "medium"
86
+ },
87
+ "xhigh": {
88
+ "reasoningEffort": "xhigh",
89
+ "reasoningSummary": "detailed",
90
+ "textVerbosity": "medium"
91
+ }
92
+ }
93
+ },
94
+ "gpt-5.4": {
95
+ "name": "GPT 5.4 (OAuth)",
96
+ "limit": {
97
+ "context": 272000,
98
+ "output": 128000
99
+ },
100
+ "modalities": {
101
+ "input": [
102
+ "text",
103
+ "image"
104
+ ],
105
+ "output": [
106
+ "text"
107
+ ]
108
+ },
109
+ "variants": {
110
+ "none": {
111
+ "reasoningEffort": "none",
112
+ "reasoningSummary": "auto",
113
+ "textVerbosity": "medium"
114
+ },
115
+ "low": {
116
+ "reasoningEffort": "low",
117
+ "reasoningSummary": "auto",
118
+ "textVerbosity": "medium"
119
+ },
120
+ "medium": {
121
+ "reasoningEffort": "medium",
122
+ "reasoningSummary": "auto",
123
+ "textVerbosity": "medium"
124
+ },
125
+ "high": {
126
+ "reasoningEffort": "high",
127
+ "reasoningSummary": "detailed",
128
+ "textVerbosity": "medium"
129
+ },
130
+ "xhigh": {
131
+ "reasoningEffort": "xhigh",
132
+ "reasoningSummary": "detailed",
133
+ "textVerbosity": "medium"
134
+ }
135
+ }
136
+ },
137
+ "gpt-5.4-pro": {
138
+ "name": "GPT 5.4 Pro (OAuth)",
139
+ "limit": {
140
+ "context": 272000,
141
+ "output": 128000
142
+ },
143
+ "modalities": {
144
+ "input": [
145
+ "text",
146
+ "image"
147
+ ],
148
+ "output": [
149
+ "text"
150
+ ]
151
+ },
152
+ "variants": {
153
+ "medium": {
154
+ "reasoningEffort": "medium",
155
+ "reasoningSummary": "detailed",
156
+ "textVerbosity": "medium"
157
+ },
158
+ "high": {
159
+ "reasoningEffort": "high",
160
+ "reasoningSummary": "detailed",
161
+ "textVerbosity": "medium"
162
+ },
163
+ "xhigh": {
164
+ "reasoningEffort": "xhigh",
165
+ "reasoningSummary": "detailed",
166
+ "textVerbosity": "medium"
167
+ }
168
+ }
169
+ },
170
+ "gpt-5.4-mini": {
171
+ "name": "GPT 5.4 Mini (OAuth)",
172
+ "limit": {
173
+ "context": 272000,
174
+ "output": 128000
175
+ },
176
+ "modalities": {
177
+ "input": [
178
+ "text",
179
+ "image"
180
+ ],
181
+ "output": [
182
+ "text"
183
+ ]
184
+ },
185
+ "options": {
186
+ "reasoningEffort": "medium",
187
+ "reasoningSummary": "auto",
188
+ "textVerbosity": "medium"
189
+ }
190
+ },
191
+ "gpt-5.4-nano": {
192
+ "name": "GPT 5.4 Nano (OAuth)",
193
+ "limit": {
194
+ "context": 272000,
195
+ "output": 128000
196
+ },
197
+ "modalities": {
198
+ "input": [
199
+ "text",
200
+ "image"
201
+ ],
202
+ "output": [
203
+ "text"
204
+ ]
205
+ },
206
+ "options": {
207
+ "reasoningEffort": "medium",
208
+ "reasoningSummary": "auto",
209
+ "textVerbosity": "medium"
210
+ }
211
+ },
212
+ "gpt-5.3-codex": {
213
+ "name": "GPT 5.3 Codex (OAuth)",
214
+ "limit": {
215
+ "context": 272000,
216
+ "output": 128000
217
+ },
218
+ "modalities": {
219
+ "input": [
220
+ "text",
221
+ "image"
222
+ ],
223
+ "output": [
224
+ "text"
225
+ ]
226
+ },
227
+ "variants": {
228
+ "low": {
229
+ "reasoningEffort": "low",
230
+ "reasoningSummary": "auto",
231
+ "textVerbosity": "medium"
232
+ },
233
+ "medium": {
234
+ "reasoningEffort": "medium",
235
+ "reasoningSummary": "auto",
236
+ "textVerbosity": "medium"
237
+ },
238
+ "high": {
239
+ "reasoningEffort": "high",
240
+ "reasoningSummary": "detailed",
241
+ "textVerbosity": "medium"
242
+ },
243
+ "xhigh": {
244
+ "reasoningEffort": "xhigh",
245
+ "reasoningSummary": "detailed",
246
+ "textVerbosity": "medium"
247
+ }
248
+ },
249
+ "options": {
250
+ "reasoningEffort": "high",
251
+ "reasoningSummary": "detailed",
252
+ "textVerbosity": "medium"
253
+ }
254
+ }
255
+ }
256
+ }
257
+ }
258
+ }
@@ -9,7 +9,7 @@
9
9
  }
10
10
  }
11
11
  },
12
- "model": "openai/gpt-5.3-codex"
12
+ "model": "openai/gpt-5.3-codex"
13
13
  }
14
14
 
15
15
 
@@ -0,0 +1,46 @@
1
+ import type { TokenResult } from "../types.js";
2
+ export declare const DEVICE_AUTH_BASE_URL = "https://auth.openai.com";
3
+ export declare const DEVICE_AUTH_API_BASE_URL = "https://auth.openai.com/api/accounts";
4
+ export declare const DEVICE_AUTH_VERIFICATION_URL = "https://auth.openai.com/codex/device";
5
+ export declare const DEVICE_AUTH_REDIRECT_URI = "https://auth.openai.com/deviceauth/callback";
6
+ export declare const DEVICE_AUTH_TIMEOUT_MS: number;
7
+ export declare const DEVICE_AUTH_DEFAULT_INTERVAL_MS = 5000;
8
+ type FetchLike = typeof fetch;
9
+ export interface DeviceAuthCode {
10
+ verificationUrl: string;
11
+ userCode: string;
12
+ deviceAuthId: string;
13
+ intervalMs: number;
14
+ expiresAtMs?: number;
15
+ }
16
+ export interface DeviceAuthCompletion {
17
+ authorizationCode: string;
18
+ codeVerifier: string;
19
+ }
20
+ export type DeviceAuthCodeResult = {
21
+ type: "success";
22
+ deviceCode: DeviceAuthCode;
23
+ } | Extract<TokenResult, {
24
+ type: "failed";
25
+ }>;
26
+ export type DeviceAuthCompletionResult = {
27
+ type: "success";
28
+ completion: DeviceAuthCompletion;
29
+ } | Extract<TokenResult, {
30
+ type: "failed";
31
+ }>;
32
+ export interface DeviceAuthFlowOptions {
33
+ fetchImpl?: FetchLike;
34
+ now?: () => number;
35
+ sleep?: (ms: number) => Promise<void>;
36
+ signal?: AbortSignal;
37
+ timeoutMs?: number;
38
+ log?: (message: string) => void;
39
+ random?: () => number;
40
+ }
41
+ export declare function requestDeviceAuthorization(options?: DeviceAuthFlowOptions): Promise<DeviceAuthCodeResult>;
42
+ export declare function printDeviceAuthorizationPrompt(deviceCode: DeviceAuthCode, log?: (message: string) => void, timeoutMs?: number, nowMs?: number): void;
43
+ export declare function pollDeviceAuthorization(deviceCode: DeviceAuthCode, options?: DeviceAuthFlowOptions): Promise<DeviceAuthCompletionResult>;
44
+ export declare function runDeviceAuthFlow(options?: DeviceAuthFlowOptions): Promise<TokenResult>;
45
+ export {};
46
+ //# sourceMappingURL=device-auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-auth.d.ts","sourceRoot":"","sources":["../../../lib/auth/device-auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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