mini-coder 0.0.14 → 0.0.15
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/dist/mc.js +421 -437
- package/docs/chatgpt-subscription-auth.md +68 -0
- package/package.json +6 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# ChatGPT/Codex subscription auth notes
|
|
2
|
+
|
|
3
|
+
mini-coder does **not** currently support logging in with a ChatGPT Plus/Pro/Codex subscription.
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
We looked at two implementations:
|
|
8
|
+
|
|
9
|
+
- OpenCode in `/tmp/opencode-src`
|
|
10
|
+
- official Codex in `/tmp/openai-codex/codex-rs`
|
|
11
|
+
|
|
12
|
+
Both rely on OpenAI **first-party/private** auth and backend APIs rather than a documented public developer API.
|
|
13
|
+
|
|
14
|
+
## What those implementations do
|
|
15
|
+
|
|
16
|
+
### Auth
|
|
17
|
+
|
|
18
|
+
They use OAuth-like flows against `https://auth.openai.com`, including:
|
|
19
|
+
|
|
20
|
+
- browser login with PKCE and a localhost callback server
|
|
21
|
+
- device-code / headless login
|
|
22
|
+
- refresh tokens via `POST /oauth/token`
|
|
23
|
+
|
|
24
|
+
Both also rely on a hardcoded first-party client id embedded in their source trees.
|
|
25
|
+
|
|
26
|
+
Examples:
|
|
27
|
+
|
|
28
|
+
- official Codex: `/tmp/openai-codex/codex-rs/core/src/auth.rs`
|
|
29
|
+
- OpenCode: `/tmp/opencode-src/packages/opencode/src/plugin/codex.ts`
|
|
30
|
+
|
|
31
|
+
### Runtime API
|
|
32
|
+
|
|
33
|
+
After login, requests are sent to ChatGPT backend endpoints such as:
|
|
34
|
+
|
|
35
|
+
- `https://chatgpt.com/backend-api/codex`
|
|
36
|
+
- `https://chatgpt.com/backend-api/codex/responses`
|
|
37
|
+
|
|
38
|
+
with headers like:
|
|
39
|
+
|
|
40
|
+
- `Authorization: Bearer <oauth access token>`
|
|
41
|
+
- `ChatGPT-Account-Id: <account id>`
|
|
42
|
+
|
|
43
|
+
Examples:
|
|
44
|
+
|
|
45
|
+
- official Codex: `/tmp/openai-codex/codex-rs/core/src/model_provider_info.rs`
|
|
46
|
+
- official Codex headers: `/tmp/openai-codex/codex-rs/backend-client/src/client.rs`
|
|
47
|
+
- OpenCode rewrite layer: `/tmp/opencode-src/packages/opencode/src/plugin/codex.ts`
|
|
48
|
+
|
|
49
|
+
## Why mini-coder is not adopting this
|
|
50
|
+
|
|
51
|
+
- It depends on undocumented/private auth endpoints.
|
|
52
|
+
- It depends on a hardcoded first-party client id.
|
|
53
|
+
- It depends on private ChatGPT backend routes.
|
|
54
|
+
- Browser login would require running a local callback server.
|
|
55
|
+
- Even the official Codex source does not expose a clean public API-based alternative here.
|
|
56
|
+
|
|
57
|
+
## Future stance
|
|
58
|
+
|
|
59
|
+
We may revisit support if OpenAI exposes a stable, documented path for:
|
|
60
|
+
|
|
61
|
+
- ChatGPT subscription login for third-party tools, or
|
|
62
|
+
- a public Codex/ChatGPT backend API intended for external clients
|
|
63
|
+
|
|
64
|
+
Until then, mini-coder only supports providers with clearer public integration paths.
|
|
65
|
+
|
|
66
|
+
## Note
|
|
67
|
+
|
|
68
|
+
If you want a supported hosted integration instead of ChatGPT subscription auth, mini-coder already supports OpenCode Zen via `OPENCODE_API_KEY`. See the existing `zen/<model>` provider path.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mini-coder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "A small, fast CLI coding agent",
|
|
5
5
|
"module": "src/index.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"typecheck": "tsc --noEmit",
|
|
14
14
|
"lint": "biome check src",
|
|
15
15
|
"format": "biome format --write src",
|
|
16
|
-
"
|
|
16
|
+
"knip": "knip",
|
|
17
|
+
"test": "bun test",
|
|
18
|
+
"jscpd": "jscpd src"
|
|
17
19
|
},
|
|
18
20
|
"dependencies": {
|
|
19
21
|
"@ai-sdk/anthropic": "^3.0.46",
|
|
@@ -30,6 +32,8 @@
|
|
|
30
32
|
"devDependencies": {
|
|
31
33
|
"@biomejs/biome": "^1.9.4",
|
|
32
34
|
"@types/bun": "latest",
|
|
35
|
+
"jscpd": "^4.0.8",
|
|
36
|
+
"knip": "^5.86.0",
|
|
33
37
|
"typescript": "^5.8.3"
|
|
34
38
|
},
|
|
35
39
|
"license": "MIT"
|