better-opencode-openai-codex-auth 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -33,14 +33,7 @@ Then authenticate and run:
33
33
 
34
34
  ```bash
35
35
  opencode auth login
36
- opencode run "write hello world to test.txt" --model=openai/gpt-5.2 --variant=medium
37
- ```
38
-
39
- **Legacy OpenCode** (v1.0.209 and below):
40
-
41
- ```bash
42
- bunx better-opencode-openai-codex-auth@latest --legacy
43
- opencode run "write hello world to test.txt" --model=openai/gpt-5.2-medium
36
+ opencode run "write hello world to test.txt" --model=openai/gpt-5.4 --variant=medium
44
37
  ```
45
38
 
46
39
  **Uninstall:**
@@ -80,19 +73,14 @@ bunx better-opencode-openai-codex-auth@dev
80
73
 
81
74
  - **gpt-5.3** (none/low/medium/high/xhigh)
82
75
  - **gpt-5.3-codex** (low/medium/high/xhigh)
83
- - **gpt-5.2** (none/low/medium/high/xhigh)
84
- - **gpt-5.2-codex** (low/medium/high/xhigh)
85
- - **gpt-5.1-codex-max** (low/medium/high/xhigh)
86
- - **gpt-5.1-codex** (low/medium/high)
87
- - **gpt-5.1-codex-mini** (medium/high)
88
- - **gpt-5.1** (none/low/medium/high)
76
+ - **gpt-5.4** (none/low/medium/high/xhigh)
77
+ - **gpt-5.4-pro** (medium/high/xhigh)
89
78
 
90
79
  ---
91
80
 
92
81
  ## Configuration
93
82
 
94
83
  - **Modern** (OpenCode v1.0.210+): `config/opencode-modern.json`
95
- - **Legacy** (OpenCode v1.0.209 and below): `config/opencode-legacy.json`
96
84
 
97
85
  Minimal configs don't work with GPT-5.x; use the full configs above.
98
86
 
@@ -101,8 +89,8 @@ Minimal configs don't work with GPT-5.x; use the full configs above.
101
89
  ## Features
102
90
 
103
91
  - ChatGPT Plus/Pro OAuth (same flow as official Codex CLI)
104
- - 33 model presets across GPT-5.3, GPT-5.2, and GPT-5.1 families
105
- - Variant system support (v1.0.210+) + legacy presets
92
+ - 18 model presets across GPT-5.4 and GPT-5.3 families
93
+ - Variant system support (v1.0.210+)
106
94
  - Multimodal input for all models
107
95
  - Usage-aware errors with automatic token refresh
108
96
  - Multi-account pool with round-robin or sticky selection (`~/.opencode/openai-codex-accounts.json`)
package/config/README.md CHANGED
@@ -7,6 +7,8 @@ This directory contains the opencode configuration template for the OpenAI Codex
7
7
  **`opencode-modern.json`** — the only config. Requires opencode v1.0.210+ (variants system).
8
8
  The installer (`bunx better-opencode-openai-codex-auth@latest`) writes this to `~/.config/opencode/opencode.jsonc` automatically.
9
9
 
10
+ The shipped template pins the plugin as `better-opencode-openai-codex-auth@latest` so fresh installs always resolve the latest published npm tarball.
11
+
10
12
  ## Available Models
11
13
 
12
14
  | Model | Variants | Notes |
@@ -15,13 +17,6 @@ The installer (`bunx better-opencode-openai-codex-auth@latest`) writes this to `
15
17
  | `gpt-5.4-pro` | medium / high / xhigh | Pro tier (no none/low) |
16
18
  | `gpt-5.3-codex` | low / medium / high / xhigh | Newest Codex family |
17
19
  | `gpt-5.3` | none / low / medium / high / xhigh | GPT-5.3 general |
18
- | `gpt-5.2` | none / low / medium / high / xhigh | |
19
- | `gpt-5.2-codex` | low / medium / high / xhigh | |
20
- | `gpt-5.1-codex-max` | low / medium / high / xhigh | |
21
- | `gpt-5.1-codex` | low / medium / high | |
22
- | `gpt-5.1-codex-mini` | medium / high | |
23
- | `gpt-5.1` | none / low / medium / high | |
24
-
25
20
  ## Manual install
26
21
 
27
22
  ```bash
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://opencode.ai/config.json",
3
- "plugin": ["better-opencode-openai-codex-auth"],
3
+ "plugin": ["better-opencode-openai-codex-auth@latest"],
4
4
  "provider": {
5
5
  "openai": {
6
6
  "options": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://opencode.ai/config.json",
3
3
  "plugin": [
4
- "better-opencode-openai-codex-auth"
4
+ "better-opencode-openai-codex-auth@latest"
5
5
  ],
6
6
  "provider": {
7
7
  "openai": {
@@ -151,194 +151,6 @@
151
151
  "textVerbosity": "medium"
152
152
  }
153
153
  }
154
- },
155
- "gpt-5.2": {
156
- "name": "GPT 5.2 (OAuth)",
157
- "limit": {
158
- "context": 272000,
159
- "output": 128000
160
- },
161
- "modalities": {
162
- "input": ["text", "image"],
163
- "output": ["text"]
164
- },
165
- "variants": {
166
- "none": {
167
- "reasoningEffort": "none",
168
- "reasoningSummary": "auto",
169
- "textVerbosity": "medium"
170
- },
171
- "low": {
172
- "reasoningEffort": "low",
173
- "reasoningSummary": "auto",
174
- "textVerbosity": "medium"
175
- },
176
- "medium": {
177
- "reasoningEffort": "medium",
178
- "reasoningSummary": "auto",
179
- "textVerbosity": "medium"
180
- },
181
- "high": {
182
- "reasoningEffort": "high",
183
- "reasoningSummary": "detailed",
184
- "textVerbosity": "medium"
185
- },
186
- "xhigh": {
187
- "reasoningEffort": "xhigh",
188
- "reasoningSummary": "detailed",
189
- "textVerbosity": "medium"
190
- }
191
- }
192
- },
193
- "gpt-5.2-codex": {
194
- "name": "GPT 5.2 Codex (OAuth)",
195
- "limit": {
196
- "context": 272000,
197
- "output": 128000
198
- },
199
- "modalities": {
200
- "input": ["text", "image"],
201
- "output": ["text"]
202
- },
203
- "variants": {
204
- "low": {
205
- "reasoningEffort": "low",
206
- "reasoningSummary": "auto",
207
- "textVerbosity": "medium"
208
- },
209
- "medium": {
210
- "reasoningEffort": "medium",
211
- "reasoningSummary": "auto",
212
- "textVerbosity": "medium"
213
- },
214
- "high": {
215
- "reasoningEffort": "high",
216
- "reasoningSummary": "detailed",
217
- "textVerbosity": "medium"
218
- },
219
- "xhigh": {
220
- "reasoningEffort": "xhigh",
221
- "reasoningSummary": "detailed",
222
- "textVerbosity": "medium"
223
- }
224
- }
225
- },
226
- "gpt-5.1-codex-max": {
227
- "name": "GPT 5.1 Codex Max (OAuth)",
228
- "limit": {
229
- "context": 272000,
230
- "output": 128000
231
- },
232
- "modalities": {
233
- "input": ["text", "image"],
234
- "output": ["text"]
235
- },
236
- "variants": {
237
- "low": {
238
- "reasoningEffort": "low",
239
- "reasoningSummary": "detailed",
240
- "textVerbosity": "medium"
241
- },
242
- "medium": {
243
- "reasoningEffort": "medium",
244
- "reasoningSummary": "detailed",
245
- "textVerbosity": "medium"
246
- },
247
- "high": {
248
- "reasoningEffort": "high",
249
- "reasoningSummary": "detailed",
250
- "textVerbosity": "medium"
251
- },
252
- "xhigh": {
253
- "reasoningEffort": "xhigh",
254
- "reasoningSummary": "detailed",
255
- "textVerbosity": "medium"
256
- }
257
- }
258
- },
259
- "gpt-5.1-codex": {
260
- "name": "GPT 5.1 Codex (OAuth)",
261
- "limit": {
262
- "context": 272000,
263
- "output": 128000
264
- },
265
- "modalities": {
266
- "input": ["text", "image"],
267
- "output": ["text"]
268
- },
269
- "variants": {
270
- "low": {
271
- "reasoningEffort": "low",
272
- "reasoningSummary": "auto",
273
- "textVerbosity": "medium"
274
- },
275
- "medium": {
276
- "reasoningEffort": "medium",
277
- "reasoningSummary": "auto",
278
- "textVerbosity": "medium"
279
- },
280
- "high": {
281
- "reasoningEffort": "high",
282
- "reasoningSummary": "detailed",
283
- "textVerbosity": "medium"
284
- }
285
- }
286
- },
287
- "gpt-5.1-codex-mini": {
288
- "name": "GPT 5.1 Codex Mini (OAuth)",
289
- "limit": {
290
- "context": 272000,
291
- "output": 128000
292
- },
293
- "modalities": {
294
- "input": ["text", "image"],
295
- "output": ["text"]
296
- },
297
- "variants": {
298
- "medium": {
299
- "reasoningEffort": "medium",
300
- "reasoningSummary": "auto",
301
- "textVerbosity": "medium"
302
- },
303
- "high": {
304
- "reasoningEffort": "high",
305
- "reasoningSummary": "detailed",
306
- "textVerbosity": "medium"
307
- }
308
- }
309
- },
310
- "gpt-5.1": {
311
- "name": "GPT 5.1 (OAuth)",
312
- "limit": {
313
- "context": 272000,
314
- "output": 128000
315
- },
316
- "modalities": {
317
- "input": ["text", "image"],
318
- "output": ["text"]
319
- },
320
- "variants": {
321
- "none": {
322
- "reasoningEffort": "none",
323
- "reasoningSummary": "auto",
324
- "textVerbosity": "medium"
325
- },
326
- "low": {
327
- "reasoningEffort": "low",
328
- "reasoningSummary": "auto",
329
- "textVerbosity": "low"
330
- },
331
- "medium": {
332
- "reasoningEffort": "medium",
333
- "reasoningSummary": "auto",
334
- "textVerbosity": "medium"
335
- },
336
- "high": {
337
- "reasoningEffort": "high",
338
- "reasoningSummary": "detailed",
339
- "textVerbosity": "high"
340
- }
341
- }
342
154
  }
343
155
  }
344
156
  }
@@ -5,7 +5,7 @@
5
5
  /** Plugin identifier for logging and error messages */
6
6
  export declare const PLUGIN_NAME = "openai-codex-plugin";
7
7
  /** Plugin version — keep in sync with package.json */
8
- export declare const PLUGIN_VERSION = "0.1.3";
8
+ export declare const PLUGIN_VERSION = "0.1.4";
9
9
  /** Base URL for ChatGPT backend API */
10
10
  export declare const CODEX_BASE_URL = "https://chatgpt.com/backend-api";
11
11
  /** Dummy API key used for OpenAI SDK (actual auth via OAuth) */
@@ -5,7 +5,7 @@
5
5
  /** Plugin identifier for logging and error messages */
6
6
  export const PLUGIN_NAME = "openai-codex-plugin";
7
7
  /** Plugin version — keep in sync with package.json */
8
- export const PLUGIN_VERSION = "0.1.3";
8
+ export const PLUGIN_VERSION = "0.1.4";
9
9
  /** Base URL for ChatGPT backend API */
10
10
  export const CODEX_BASE_URL = "https://chatgpt.com/backend-api";
11
11
  /** Dummy API key used for OpenAI SDK (actual auth via OAuth) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-opencode-openai-codex-auth",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "OpenAI ChatGPT (Codex backend) OAuth auth plugin for opencode - use your ChatGPT Plus/Pro subscription instead of API credits",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -8,6 +8,7 @@ import { homedir } from "node:os";
8
8
  import { parse, modify, applyEdits, printParseErrorCode } from "jsonc-parser";
9
9
 
10
10
  const PLUGIN_NAME = "better-opencode-openai-codex-auth";
11
+ const PLUGIN_REF = `${PLUGIN_NAME}@latest`;
11
12
  const args = new Set(process.argv.slice(2));
12
13
 
13
14
  if (args.has("--help") || args.has("-h")) {
@@ -61,7 +62,7 @@ function normalizePluginList(list) {
61
62
  if (typeof entry !== "string") return true;
62
63
  return entry !== PLUGIN_NAME && !entry.startsWith(`${PLUGIN_NAME}@`);
63
64
  });
64
- return [...filtered, PLUGIN_NAME];
65
+ return [...filtered, PLUGIN_REF];
65
66
  }
66
67
 
67
68
  function removePluginEntries(list) {
@@ -354,7 +355,7 @@ async function main() {
354
355
  }
355
356
 
356
357
  const template = await readJson(templatePath);
357
- template.plugin = [PLUGIN_NAME];
358
+ template.plugin = [PLUGIN_REF];
358
359
 
359
360
  let nextConfig = template;
360
361
  let nextContent = null;