oc-chatgpt-multi-auth 5.3.0 → 5.3.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,18 +1,18 @@
1
- <svg width="234" height="42" viewBox="0 0 234 42" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M18 30H6V18H18V30Z" fill="#4B4646"/>
3
- <path d="M18 12H6V30H18V12ZM24 36H0V6H24V36Z" fill="#B7B1B1"/>
4
- <path d="M48 30H36V18H48V30Z" fill="#4B4646"/>
5
- <path d="M36 30H48V12H36V30ZM54 36H36V42H30V6H54V36Z" fill="#B7B1B1"/>
6
- <path d="M84 24V30H66V24H84Z" fill="#4B4646"/>
7
- <path d="M84 24H66V30H84V36H60V6H84V24ZM66 18H78V12H66V18Z" fill="#B7B1B1"/>
8
- <path d="M108 36H96V18H108V36Z" fill="#4B4646"/>
9
- <path d="M108 12H96V36H90V6H108V12ZM114 36H108V12H114V36Z" fill="#B7B1B1"/>
10
- <path d="M144 30H126V18H144V30Z" fill="#4B4646"/>
11
- <path d="M144 12H126V30H144V36H120V6H144V12Z" fill="#F1ECEC"/>
12
- <path d="M168 30H156V18H168V30Z" fill="#4B4646"/>
13
- <path d="M168 12H156V30H168V12ZM174 36H150V6H174V36Z" fill="#F1ECEC"/>
14
- <path d="M198 30H186V18H198V30Z" fill="#4B4646"/>
15
- <path d="M198 12H186V30H198V12ZM204 36H180V6H198V0H204V36Z" fill="#F1ECEC"/>
16
- <path d="M234 24V30H216V24H234Z" fill="#4B4646"/>
17
- <path d="M216 12V18H228V12H216ZM234 24H216V30H234V36H210V6H234V24Z" fill="#F1ECEC"/>
18
- </svg>
1
+ <svg width="234" height="42" viewBox="0 0 234 42" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M18 30H6V18H18V30Z" fill="#4B4646"/>
3
+ <path d="M18 12H6V30H18V12ZM24 36H0V6H24V36Z" fill="#B7B1B1"/>
4
+ <path d="M48 30H36V18H48V30Z" fill="#4B4646"/>
5
+ <path d="M36 30H48V12H36V30ZM54 36H36V42H30V6H54V36Z" fill="#B7B1B1"/>
6
+ <path d="M84 24V30H66V24H84Z" fill="#4B4646"/>
7
+ <path d="M84 24H66V30H84V36H60V6H84V24ZM66 18H78V12H66V18Z" fill="#B7B1B1"/>
8
+ <path d="M108 36H96V18H108V36Z" fill="#4B4646"/>
9
+ <path d="M108 12H96V36H90V6H108V12ZM114 36H108V12H114V36Z" fill="#B7B1B1"/>
10
+ <path d="M144 30H126V18H144V30Z" fill="#4B4646"/>
11
+ <path d="M144 12H126V30H144V36H120V6H144V12Z" fill="#F1ECEC"/>
12
+ <path d="M168 30H156V18H168V30Z" fill="#4B4646"/>
13
+ <path d="M168 12H156V30H168V12ZM174 36H150V6H174V36Z" fill="#F1ECEC"/>
14
+ <path d="M198 30H186V18H198V30Z" fill="#4B4646"/>
15
+ <path d="M198 12H186V30H198V12ZM204 36H180V6H198V0H204V36Z" fill="#F1ECEC"/>
16
+ <path d="M234 24V30H216V24H234Z" fill="#4B4646"/>
17
+ <path d="M216 12V18H228V12H216ZM234 24H216V30H234V36H210V6H234V24Z" fill="#F1ECEC"/>
18
+ </svg>
@@ -1,31 +1,31 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="300" viewBox="0 0 1200 300" role="img" aria-label="OpenCode Codex OAuth">
2
- <defs>
3
- <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
4
- <stop offset="0%" stop-color="#0f172a" />
5
- <stop offset="100%" stop-color="#1f2937" />
6
- </linearGradient>
7
- <linearGradient id="accent" x1="0" y1="0" x2="1" y2="0">
8
- <stop offset="0%" stop-color="#38bdf8" />
9
- <stop offset="100%" stop-color="#22d3ee" />
10
- </linearGradient>
11
- </defs>
12
- <rect width="1200" height="300" rx="28" fill="url(#bg)" />
13
- <g opacity="0.12">
14
- <circle cx="1020" cy="70" r="120" fill="#38bdf8" />
15
- <circle cx="150" cy="260" r="140" fill="#22d3ee" />
16
- </g>
17
- <g fill="none" stroke="url(#accent)" stroke-width="8" stroke-linecap="round" stroke-linejoin="round">
18
- <path d="M160 95 L100 150 L160 205" />
19
- <path d="M280 95 L340 150 L280 205" />
20
- <path d="M205 80 L235 220" />
21
- </g>
22
- <text x="420" y="120" fill="#e2e8f0" font-size="42" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif" font-weight="600">
23
- OpenCode Codex OAuth
24
- </text>
25
- <text x="420" y="170" fill="#cbd5f5" font-size="24" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
26
- ChatGPT Plus/Pro auth for GPT-5.2 and Codex models
27
- </text>
28
- <text x="420" y="220" fill="#7dd3fc" font-size="18" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
29
- One-command install, modern variants, full tool support
30
- </text>
31
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="300" viewBox="0 0 1200 300" role="img" aria-label="OpenCode Codex OAuth">
2
+ <defs>
3
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
4
+ <stop offset="0%" stop-color="#0f172a" />
5
+ <stop offset="100%" stop-color="#1f2937" />
6
+ </linearGradient>
7
+ <linearGradient id="accent" x1="0" y1="0" x2="1" y2="0">
8
+ <stop offset="0%" stop-color="#38bdf8" />
9
+ <stop offset="100%" stop-color="#22d3ee" />
10
+ </linearGradient>
11
+ </defs>
12
+ <rect width="1200" height="300" rx="28" fill="url(#bg)" />
13
+ <g opacity="0.12">
14
+ <circle cx="1020" cy="70" r="120" fill="#38bdf8" />
15
+ <circle cx="150" cy="260" r="140" fill="#22d3ee" />
16
+ </g>
17
+ <g fill="none" stroke="url(#accent)" stroke-width="8" stroke-linecap="round" stroke-linejoin="round">
18
+ <path d="M160 95 L100 150 L160 205" />
19
+ <path d="M280 95 L340 150 L280 205" />
20
+ <path d="M205 80 L235 220" />
21
+ </g>
22
+ <text x="420" y="120" fill="#e2e8f0" font-size="42" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif" font-weight="600">
23
+ OpenCode Codex OAuth
24
+ </text>
25
+ <text x="420" y="170" fill="#cbd5f5" font-size="24" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
26
+ ChatGPT Plus/Pro auth for GPT-5.2 and Codex models
27
+ </text>
28
+ <text x="420" y="220" fill="#7dd3fc" font-size="18" font-family="'IBM Plex Sans','Segoe UI',Arial,sans-serif">
29
+ One-command install, modern variants, full tool support
30
+ </text>
31
+ </svg>
package/config/README.md CHANGED
@@ -1,86 +1,86 @@
1
- # Configuration
2
-
3
- This directory contains the official OpenCode config templates for the ChatGPT Codex OAuth plugin.
4
-
5
- ## Required: choose the right config file
6
-
7
- | File | OpenCode version | Description |
8
- |------|------------------|-------------|
9
- | [`opencode-modern.json`](./opencode-modern.json) | **v1.0.210+** | Variant-based config: 6 base models with 21 total presets |
10
- | [`opencode-legacy.json`](./opencode-legacy.json) | **v1.0.209 and below** | Legacy explicit entries: 21 individual model definitions |
11
-
12
- ## Quick pick
13
-
14
- If your OpenCode version is v1.0.210 or newer:
15
-
16
- ```bash
17
- cp config/opencode-modern.json ~/.config/opencode/opencode.json
18
- ```
19
-
20
- If your OpenCode version is v1.0.209 or older:
21
-
22
- ```bash
23
- cp config/opencode-legacy.json ~/.config/opencode/opencode.json
24
- ```
25
-
26
- Check your version with:
27
-
28
- ```bash
29
- opencode --version
30
- ```
31
-
32
- ## Why there are two templates
33
-
34
- OpenCode v1.0.210+ added model `variants`, so one model entry can expose multiple reasoning levels. That keeps modern config much smaller while preserving the same effective presets.
35
-
36
- Both templates include:
37
- - GPT-5.2, GPT-5 Codex, GPT-5.1, GPT-5.1 Codex, GPT-5.1 Codex Max, GPT-5.1 Codex Mini
38
- - Reasoning variants per model family
39
- - `store: false` and `include: ["reasoning.encrypted_content"]`
40
- - Context metadata (272k context / 128k output)
41
-
42
- ## Spark model note
43
-
44
- The templates intentionally do **not** include `gpt-5.3-codex-spark` by default. Spark is often entitlement-gated at the account/workspace level, so shipping it by default causes avoidable startup failures for many users.
45
-
46
- If your workspace is entitled, you can add Spark model IDs manually.
47
-
48
- ## Usage examples
49
-
50
- Modern template (v1.0.210+):
51
-
52
- ```bash
53
- opencode run "task" --model=openai/gpt-5.2 --variant=medium
54
- opencode run "task" --model=openai/gpt-5-codex --variant=high
55
- ```
56
-
57
- Legacy template (v1.0.209 and below):
58
-
59
- ```bash
60
- opencode run "task" --model=openai/gpt-5.2-medium
61
- opencode run "task" --model=openai/gpt-5-codex-high
62
- ```
63
-
64
- ## Minimal config (advanced)
65
-
66
- A barebones debug template is available at [`minimal-opencode.json`](./minimal-opencode.json). It omits the full preset catalog.
67
-
68
- ## Unsupported-model behavior
69
-
70
- Current defaults are strict entitlement handling:
71
- - `unsupportedCodexPolicy: "strict"` returns entitlement errors directly
72
- - set `unsupportedCodexPolicy: "fallback"` (or `CODEX_AUTH_UNSUPPORTED_MODEL_POLICY=fallback`) to enable automatic fallback retries
73
- - `fallbackToGpt52OnUnsupportedGpt53: true` keeps the legacy `gpt-5.3-codex -> gpt-5.2-codex` edge inside fallback mode
74
- - `unsupportedCodexFallbackChain` lets you override fallback order per model
75
-
76
- Default fallback chain (when policy is `fallback`):
77
- - `gpt-5.3-codex -> gpt-5-codex -> gpt-5.2-codex`
78
- - `gpt-5.3-codex-spark -> gpt-5-codex -> gpt-5.3-codex -> gpt-5.2-codex` (only relevant if Spark IDs are added manually)
79
- - `gpt-5.2-codex -> gpt-5-codex`
80
- - `gpt-5.1-codex -> gpt-5-codex`
81
-
82
- ## Additional docs
83
-
84
- - Main config reference: [`docs/configuration.md`](../docs/configuration.md)
85
- - Getting started: [`docs/getting-started.md`](../docs/getting-started.md)
86
- - Troubleshooting: [`docs/troubleshooting.md`](../docs/troubleshooting.md)
1
+ # Configuration
2
+
3
+ This directory contains the official OpenCode config templates for the ChatGPT Codex OAuth plugin.
4
+
5
+ ## Required: choose the right config file
6
+
7
+ | File | OpenCode version | Description |
8
+ |------|------------------|-------------|
9
+ | [`opencode-modern.json`](./opencode-modern.json) | **v1.0.210+** | Variant-based config: 6 base models with 21 total presets |
10
+ | [`opencode-legacy.json`](./opencode-legacy.json) | **v1.0.209 and below** | Legacy explicit entries: 21 individual model definitions |
11
+
12
+ ## Quick pick
13
+
14
+ If your OpenCode version is v1.0.210 or newer:
15
+
16
+ ```bash
17
+ cp config/opencode-modern.json ~/.config/opencode/opencode.json
18
+ ```
19
+
20
+ If your OpenCode version is v1.0.209 or older:
21
+
22
+ ```bash
23
+ cp config/opencode-legacy.json ~/.config/opencode/opencode.json
24
+ ```
25
+
26
+ Check your version with:
27
+
28
+ ```bash
29
+ opencode --version
30
+ ```
31
+
32
+ ## Why there are two templates
33
+
34
+ OpenCode v1.0.210+ added model `variants`, so one model entry can expose multiple reasoning levels. That keeps modern config much smaller while preserving the same effective presets.
35
+
36
+ Both templates include:
37
+ - GPT-5.2, GPT-5 Codex, GPT-5.1, GPT-5.1 Codex, GPT-5.1 Codex Max, GPT-5.1 Codex Mini
38
+ - Reasoning variants per model family
39
+ - `store: false` and `include: ["reasoning.encrypted_content"]`
40
+ - Context metadata (272k context / 128k output)
41
+
42
+ ## Spark model note
43
+
44
+ The templates intentionally do **not** include `gpt-5.3-codex-spark` by default. Spark is often entitlement-gated at the account/workspace level, so shipping it by default causes avoidable startup failures for many users.
45
+
46
+ If your workspace is entitled, you can add Spark model IDs manually.
47
+
48
+ ## Usage examples
49
+
50
+ Modern template (v1.0.210+):
51
+
52
+ ```bash
53
+ opencode run "task" --model=openai/gpt-5.2 --variant=medium
54
+ opencode run "task" --model=openai/gpt-5-codex --variant=high
55
+ ```
56
+
57
+ Legacy template (v1.0.209 and below):
58
+
59
+ ```bash
60
+ opencode run "task" --model=openai/gpt-5.2-medium
61
+ opencode run "task" --model=openai/gpt-5-codex-high
62
+ ```
63
+
64
+ ## Minimal config (advanced)
65
+
66
+ A barebones debug template is available at [`minimal-opencode.json`](./minimal-opencode.json). It omits the full preset catalog.
67
+
68
+ ## Unsupported-model behavior
69
+
70
+ Current defaults are strict entitlement handling:
71
+ - `unsupportedCodexPolicy: "strict"` returns entitlement errors directly
72
+ - set `unsupportedCodexPolicy: "fallback"` (or `CODEX_AUTH_UNSUPPORTED_MODEL_POLICY=fallback`) to enable automatic fallback retries
73
+ - `fallbackToGpt52OnUnsupportedGpt53: true` keeps the legacy `gpt-5.3-codex -> gpt-5.2-codex` edge inside fallback mode
74
+ - `unsupportedCodexFallbackChain` lets you override fallback order per model
75
+
76
+ Default fallback chain (when policy is `fallback`):
77
+ - `gpt-5.3-codex -> gpt-5-codex -> gpt-5.2-codex`
78
+ - `gpt-5.3-codex-spark -> gpt-5-codex -> gpt-5.3-codex -> gpt-5.2-codex` (only relevant if Spark IDs are added manually)
79
+ - `gpt-5.2-codex -> gpt-5-codex`
80
+ - `gpt-5.1-codex -> gpt-5-codex`
81
+
82
+ ## Additional docs
83
+
84
+ - Main config reference: [`docs/configuration.md`](../docs/configuration.md)
85
+ - Getting started: [`docs/getting-started.md`](../docs/getting-started.md)
86
+ - Troubleshooting: [`docs/troubleshooting.md`](../docs/troubleshooting.md)
@@ -1,13 +1,13 @@
1
- {
2
- "$schema": "https://opencode.ai/config.json",
3
- "plugin": ["oc-chatgpt-multi-auth"],
4
-
5
- "provider": {
6
- "openai": {
7
- "options": {
8
- "store": false
9
- }
10
- }
11
- },
12
- "model": "openai/gpt-5-codex"
13
- }
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "plugin": ["oc-chatgpt-multi-auth"],
4
+
5
+ "provider": {
6
+ "openai": {
7
+ "options": {
8
+ "store": false
9
+ }
10
+ }
11
+ },
12
+ "model": "openai/gpt-5-codex"
13
+ }