opencode-openai-codex-auth-multi 4.3.0-multiaccount.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +37 -0
- package/README.md +107 -0
- package/assets/opencode-logo-ornate-dark.svg +18 -0
- package/assets/readme-hero.svg +31 -0
- package/config/README.md +110 -0
- package/config/minimal-opencode.json +13 -0
- package/config/opencode-legacy.json +572 -0
- package/config/opencode-modern.json +240 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +666 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/accounts.d.ts +48 -0
- package/dist/lib/accounts.d.ts.map +1 -0
- package/dist/lib/accounts.js +282 -0
- package/dist/lib/accounts.js.map +1 -0
- package/dist/lib/auth/auth.d.ts +43 -0
- package/dist/lib/auth/auth.d.ts.map +1 -0
- package/dist/lib/auth/auth.js +163 -0
- package/dist/lib/auth/auth.js.map +1 -0
- package/dist/lib/auth/browser.d.ts +17 -0
- package/dist/lib/auth/browser.d.ts.map +1 -0
- package/dist/lib/auth/browser.js +76 -0
- package/dist/lib/auth/browser.js.map +1 -0
- package/dist/lib/auth/server.d.ts +10 -0
- package/dist/lib/auth/server.d.ts.map +1 -0
- package/dist/lib/auth/server.js +78 -0
- package/dist/lib/auth/server.js.map +1 -0
- package/dist/lib/cli.d.ts +8 -0
- package/dist/lib/cli.d.ts.map +1 -0
- package/dist/lib/cli.js +44 -0
- package/dist/lib/cli.js.map +1 -0
- package/dist/lib/config.d.ts +17 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +51 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/constants.d.ts +67 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +67 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/logger.d.ts +26 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +110 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/oauth-success.html +712 -0
- package/dist/lib/prompts/codex-opencode-bridge.d.ts +19 -0
- package/dist/lib/prompts/codex-opencode-bridge.d.ts.map +1 -0
- package/dist/lib/prompts/codex-opencode-bridge.js +152 -0
- package/dist/lib/prompts/codex-opencode-bridge.js.map +1 -0
- package/dist/lib/prompts/codex.d.ts +27 -0
- package/dist/lib/prompts/codex.d.ts.map +1 -0
- package/dist/lib/prompts/codex.js +241 -0
- package/dist/lib/prompts/codex.js.map +1 -0
- package/dist/lib/prompts/opencode-codex.d.ts +21 -0
- package/dist/lib/prompts/opencode-codex.d.ts.map +1 -0
- package/dist/lib/prompts/opencode-codex.js +91 -0
- package/dist/lib/prompts/opencode-codex.js.map +1 -0
- package/dist/lib/request/fetch-helpers.d.ts +81 -0
- package/dist/lib/request/fetch-helpers.d.ts.map +1 -0
- package/dist/lib/request/fetch-helpers.js +321 -0
- package/dist/lib/request/fetch-helpers.js.map +1 -0
- package/dist/lib/request/helpers/input-utils.d.ts +6 -0
- package/dist/lib/request/helpers/input-utils.d.ts.map +1 -0
- package/dist/lib/request/helpers/input-utils.js +174 -0
- package/dist/lib/request/helpers/input-utils.js.map +1 -0
- package/dist/lib/request/helpers/model-map.d.ts +28 -0
- package/dist/lib/request/helpers/model-map.d.ts.map +1 -0
- package/dist/lib/request/helpers/model-map.js +109 -0
- package/dist/lib/request/helpers/model-map.js.map +1 -0
- package/dist/lib/request/request-transformer.d.ts +93 -0
- package/dist/lib/request/request-transformer.d.ts.map +1 -0
- package/dist/lib/request/request-transformer.js +403 -0
- package/dist/lib/request/request-transformer.js.map +1 -0
- package/dist/lib/request/response-handler.d.ts +14 -0
- package/dist/lib/request/response-handler.d.ts.map +1 -0
- package/dist/lib/request/response-handler.js +90 -0
- package/dist/lib/request/response-handler.js.map +1 -0
- package/dist/lib/storage.d.ts +23 -0
- package/dist/lib/storage.d.ts.map +1 -0
- package/dist/lib/storage.js +153 -0
- package/dist/lib/storage.js.map +1 -0
- package/dist/lib/types.d.ts +170 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/package.json +71 -0
- package/scripts/copy-oauth-success.js +37 -0
- package/scripts/install-opencode-codex-auth.js +193 -0
- package/scripts/test-all-models.sh +260 -0
- package/scripts/validate-model-map.sh +97 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"plugin": [
|
|
4
|
+
"opencode-openai-codex-auth-multi"
|
|
5
|
+
],
|
|
6
|
+
|
|
7
|
+
"provider": {
|
|
8
|
+
"openai": {
|
|
9
|
+
"options": {
|
|
10
|
+
"reasoningEffort": "medium",
|
|
11
|
+
"reasoningSummary": "auto",
|
|
12
|
+
"textVerbosity": "medium",
|
|
13
|
+
"include": [
|
|
14
|
+
"reasoning.encrypted_content"
|
|
15
|
+
],
|
|
16
|
+
"store": false
|
|
17
|
+
},
|
|
18
|
+
"models": {
|
|
19
|
+
"gpt-5.2": {
|
|
20
|
+
"name": "GPT 5.2 (OAuth)",
|
|
21
|
+
"limit": {
|
|
22
|
+
"context": 272000,
|
|
23
|
+
"output": 128000
|
|
24
|
+
},
|
|
25
|
+
"modalities": {
|
|
26
|
+
"input": [
|
|
27
|
+
"text",
|
|
28
|
+
"image"
|
|
29
|
+
],
|
|
30
|
+
"output": [
|
|
31
|
+
"text"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"variants": {
|
|
35
|
+
"none": {
|
|
36
|
+
"reasoningEffort": "none",
|
|
37
|
+
"reasoningSummary": "auto",
|
|
38
|
+
"textVerbosity": "medium"
|
|
39
|
+
},
|
|
40
|
+
"low": {
|
|
41
|
+
"reasoningEffort": "low",
|
|
42
|
+
"reasoningSummary": "auto",
|
|
43
|
+
"textVerbosity": "medium"
|
|
44
|
+
},
|
|
45
|
+
"medium": {
|
|
46
|
+
"reasoningEffort": "medium",
|
|
47
|
+
"reasoningSummary": "auto",
|
|
48
|
+
"textVerbosity": "medium"
|
|
49
|
+
},
|
|
50
|
+
"high": {
|
|
51
|
+
"reasoningEffort": "high",
|
|
52
|
+
"reasoningSummary": "detailed",
|
|
53
|
+
"textVerbosity": "medium"
|
|
54
|
+
},
|
|
55
|
+
"xhigh": {
|
|
56
|
+
"reasoningEffort": "xhigh",
|
|
57
|
+
"reasoningSummary": "detailed",
|
|
58
|
+
"textVerbosity": "medium"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"gpt-5.2-codex": {
|
|
63
|
+
"name": "GPT 5.2 Codex (OAuth)",
|
|
64
|
+
"limit": {
|
|
65
|
+
"context": 272000,
|
|
66
|
+
"output": 128000
|
|
67
|
+
},
|
|
68
|
+
"modalities": {
|
|
69
|
+
"input": [
|
|
70
|
+
"text",
|
|
71
|
+
"image"
|
|
72
|
+
],
|
|
73
|
+
"output": [
|
|
74
|
+
"text"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"variants": {
|
|
78
|
+
"low": {
|
|
79
|
+
"reasoningEffort": "low",
|
|
80
|
+
"reasoningSummary": "auto",
|
|
81
|
+
"textVerbosity": "medium"
|
|
82
|
+
},
|
|
83
|
+
"medium": {
|
|
84
|
+
"reasoningEffort": "medium",
|
|
85
|
+
"reasoningSummary": "auto",
|
|
86
|
+
"textVerbosity": "medium"
|
|
87
|
+
},
|
|
88
|
+
"high": {
|
|
89
|
+
"reasoningEffort": "high",
|
|
90
|
+
"reasoningSummary": "detailed",
|
|
91
|
+
"textVerbosity": "medium"
|
|
92
|
+
},
|
|
93
|
+
"xhigh": {
|
|
94
|
+
"reasoningEffort": "xhigh",
|
|
95
|
+
"reasoningSummary": "detailed",
|
|
96
|
+
"textVerbosity": "medium"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"gpt-5.1-codex-max": {
|
|
101
|
+
"name": "GPT 5.1 Codex Max (OAuth)",
|
|
102
|
+
"limit": {
|
|
103
|
+
"context": 272000,
|
|
104
|
+
"output": 128000
|
|
105
|
+
},
|
|
106
|
+
"modalities": {
|
|
107
|
+
"input": [
|
|
108
|
+
"text",
|
|
109
|
+
"image"
|
|
110
|
+
],
|
|
111
|
+
"output": [
|
|
112
|
+
"text"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"variants": {
|
|
116
|
+
"low": {
|
|
117
|
+
"reasoningEffort": "low",
|
|
118
|
+
"reasoningSummary": "detailed",
|
|
119
|
+
"textVerbosity": "medium"
|
|
120
|
+
},
|
|
121
|
+
"medium": {
|
|
122
|
+
"reasoningEffort": "medium",
|
|
123
|
+
"reasoningSummary": "detailed",
|
|
124
|
+
"textVerbosity": "medium"
|
|
125
|
+
},
|
|
126
|
+
"high": {
|
|
127
|
+
"reasoningEffort": "high",
|
|
128
|
+
"reasoningSummary": "detailed",
|
|
129
|
+
"textVerbosity": "medium"
|
|
130
|
+
},
|
|
131
|
+
"xhigh": {
|
|
132
|
+
"reasoningEffort": "xhigh",
|
|
133
|
+
"reasoningSummary": "detailed",
|
|
134
|
+
"textVerbosity": "medium"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"gpt-5.1-codex": {
|
|
139
|
+
"name": "GPT 5.1 Codex (OAuth)",
|
|
140
|
+
"limit": {
|
|
141
|
+
"context": 272000,
|
|
142
|
+
"output": 128000
|
|
143
|
+
},
|
|
144
|
+
"modalities": {
|
|
145
|
+
"input": [
|
|
146
|
+
"text",
|
|
147
|
+
"image"
|
|
148
|
+
],
|
|
149
|
+
"output": [
|
|
150
|
+
"text"
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
"variants": {
|
|
154
|
+
"low": {
|
|
155
|
+
"reasoningEffort": "low",
|
|
156
|
+
"reasoningSummary": "auto",
|
|
157
|
+
"textVerbosity": "medium"
|
|
158
|
+
},
|
|
159
|
+
"medium": {
|
|
160
|
+
"reasoningEffort": "medium",
|
|
161
|
+
"reasoningSummary": "auto",
|
|
162
|
+
"textVerbosity": "medium"
|
|
163
|
+
},
|
|
164
|
+
"high": {
|
|
165
|
+
"reasoningEffort": "high",
|
|
166
|
+
"reasoningSummary": "detailed",
|
|
167
|
+
"textVerbosity": "medium"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"gpt-5.1-codex-mini": {
|
|
172
|
+
"name": "GPT 5.1 Codex Mini (OAuth)",
|
|
173
|
+
"limit": {
|
|
174
|
+
"context": 272000,
|
|
175
|
+
"output": 128000
|
|
176
|
+
},
|
|
177
|
+
"modalities": {
|
|
178
|
+
"input": [
|
|
179
|
+
"text",
|
|
180
|
+
"image"
|
|
181
|
+
],
|
|
182
|
+
"output": [
|
|
183
|
+
"text"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"variants": {
|
|
187
|
+
"medium": {
|
|
188
|
+
"reasoningEffort": "medium",
|
|
189
|
+
"reasoningSummary": "auto",
|
|
190
|
+
"textVerbosity": "medium"
|
|
191
|
+
},
|
|
192
|
+
"high": {
|
|
193
|
+
"reasoningEffort": "high",
|
|
194
|
+
"reasoningSummary": "detailed",
|
|
195
|
+
"textVerbosity": "medium"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"gpt-5.1": {
|
|
200
|
+
"name": "GPT 5.1 (OAuth)",
|
|
201
|
+
"limit": {
|
|
202
|
+
"context": 272000,
|
|
203
|
+
"output": 128000
|
|
204
|
+
},
|
|
205
|
+
"modalities": {
|
|
206
|
+
"input": [
|
|
207
|
+
"text",
|
|
208
|
+
"image"
|
|
209
|
+
],
|
|
210
|
+
"output": [
|
|
211
|
+
"text"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"variants": {
|
|
215
|
+
"none": {
|
|
216
|
+
"reasoningEffort": "none",
|
|
217
|
+
"reasoningSummary": "auto",
|
|
218
|
+
"textVerbosity": "medium"
|
|
219
|
+
},
|
|
220
|
+
"low": {
|
|
221
|
+
"reasoningEffort": "low",
|
|
222
|
+
"reasoningSummary": "auto",
|
|
223
|
+
"textVerbosity": "low"
|
|
224
|
+
},
|
|
225
|
+
"medium": {
|
|
226
|
+
"reasoningEffort": "medium",
|
|
227
|
+
"reasoningSummary": "auto",
|
|
228
|
+
"textVerbosity": "medium"
|
|
229
|
+
},
|
|
230
|
+
"high": {
|
|
231
|
+
"reasoningEffort": "high",
|
|
232
|
+
"reasoningSummary": "detailed",
|
|
233
|
+
"textVerbosity": "high"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI ChatGPT (Codex) OAuth Authentication Plugin for opencode
|
|
3
|
+
*
|
|
4
|
+
* COMPLIANCE NOTICE:
|
|
5
|
+
* This plugin uses OpenAI's official OAuth authentication flow (the same method
|
|
6
|
+
* used by OpenAI's official Codex CLI at https://github.com/openai/codex).
|
|
7
|
+
*
|
|
8
|
+
* INTENDED USE: Personal development and coding assistance with your own
|
|
9
|
+
* ChatGPT Plus/Pro subscription.
|
|
10
|
+
*
|
|
11
|
+
* NOT INTENDED FOR: Commercial resale, multi-user services, high-volume
|
|
12
|
+
* automated extraction, or any use that violates OpenAI's Terms of Service.
|
|
13
|
+
*
|
|
14
|
+
* Users are responsible for ensuring their usage complies with:
|
|
15
|
+
* - OpenAI Terms of Use: https://openai.com/policies/terms-of-use/
|
|
16
|
+
* - OpenAI Usage Policies: https://openai.com/policies/usage-policies/
|
|
17
|
+
*
|
|
18
|
+
* For production applications, use the OpenAI Platform API: https://platform.openai.com/
|
|
19
|
+
*
|
|
20
|
+
* @license MIT with Usage Disclaimer (see LICENSE file)
|
|
21
|
+
* @author numman-ali
|
|
22
|
+
* @repository https://github.com/ndycode/opencode-openai-codex-auth-multiaccount
|
|
23
|
+
|
|
24
|
+
*/
|
|
25
|
+
import { type Plugin } from "@opencode-ai/plugin";
|
|
26
|
+
/**
|
|
27
|
+
* OpenAI Codex OAuth authentication plugin for opencode
|
|
28
|
+
*
|
|
29
|
+
* This plugin enables opencode to use OpenAI's Codex backend via ChatGPT Plus/Pro
|
|
30
|
+
* OAuth authentication, allowing users to leverage their ChatGPT subscription
|
|
31
|
+
* instead of OpenAI Platform API credits.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```json
|
|
35
|
+
* {
|
|
36
|
+
* "plugin": ["opencode-openai-codex-auth-multiaccount"],
|
|
37
|
+
|
|
38
|
+
* "model": "openai/gpt-5-codex"
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare const OpenAIAuthPlugin: Plugin;
|
|
43
|
+
export default OpenAIAuthPlugin;
|
|
44
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAQ,KAAK,MAAM,EAAoB,MAAM,qBAAqB,CAAC;AA4C1E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,MA2zB9B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|