@henryqw/pi-multi-codex 1.0.0 → 1.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.
- package/README.md +15 -11
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
# `@henryqw/pi-multi-codex`
|
|
2
2
|
|
|
3
|
-
Add multiple ChatGPT Codex OAuth accounts and start new Pi work on the slot with the most weekly quota.
|
|
3
|
+
Add multiple ChatGPT Codex OAuth accounts and start new Pi work on the eligible slot with the most weekly quota. Optional automatic switching can retry an HTTP 429 on another eligible slot.
|
|
4
4
|
|
|
5
5
|

|
|
6
|
-
|
|
7
|
-
## Why
|
|
8
|
-
|
|
9
|
-
- **Created for**: Pi users who work across more than one Codex subscription.
|
|
10
|
-
- **Advantage**: Quota-aware routing starts with the eligible slot that has the most remaining seven-day quota. With automatic switching enabled, Pi can retry an HTTP 429 response on another eligible slot.
|
|
6
|
+

|
|
11
7
|
|
|
12
8
|
## Install
|
|
13
9
|
|
|
@@ -15,7 +11,7 @@ Add multiple ChatGPT Codex OAuth accounts and start new Pi work on the slot with
|
|
|
15
11
|
pi install npm:@henryqw/pi-multi-codex
|
|
16
12
|
```
|
|
17
13
|
|
|
18
|
-
##
|
|
14
|
+
## Works with
|
|
19
15
|
|
|
20
16
|
| Package | Why |
|
|
21
17
|
| --- | --- |
|
|
@@ -37,9 +33,8 @@ Run `/login` and authenticate `OpenAI Codex` for slot 1 first. Run `/codex-add`,
|
|
|
37
33
|
|
|
38
34
|
A numbered slot is one Codex account position in Pi.
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
## Flow
|
|
41
37
|
|
|
42
|
-
- The extension reads `auth.json`. It never writes or refreshes credentials.
|
|
43
38
|
- Before the first agent start, only fresh quota snapshots enter startup ranking. The slot with the most seven-day quota wins.
|
|
44
39
|
- After HTTP 429, failover can use authenticated, registered, scope-allowed, untried slots with stale or missing quota.
|
|
45
40
|
- Failover skips known active five-hour blocks. It ranks fresh known quota first, then unranked slots by slot number.
|
|
@@ -47,7 +42,6 @@ A numbered slot is one Codex account position in Pi.
|
|
|
47
42
|
- During one agent run, each eligible slot is tried at most once after HTTP 429 responses.
|
|
48
43
|
- Automatic retry stops when no untried eligible slot remains.
|
|
49
44
|
- The footer shows the active slot's fresh quota or five-hour block.
|
|
50
|
-
- Scoped sessions can switch only to exact scoped aliases.
|
|
51
45
|
|
|
52
46
|
## Config
|
|
53
47
|
|
|
@@ -61,4 +55,14 @@ Automatic HTTP 429 switching is on by default. To disable it, create `~/.pi/agen
|
|
|
61
55
|
|
|
62
56
|
The config must contain only `autoSwitchOn429` as a boolean. Invalid config is preserved and disables automatic switching.
|
|
63
57
|
|
|
64
|
-
|
|
58
|
+
## State and storage
|
|
59
|
+
|
|
60
|
+
The extension maintains a generated, credential-free quota cache at `~/.pi/agent/config/pi-multi-codex/usage.json`.
|
|
61
|
+
|
|
62
|
+
## Data, cost, and privacy
|
|
63
|
+
|
|
64
|
+
The extension reads `auth.json`. It never writes or refreshes credentials.
|
|
65
|
+
|
|
66
|
+
## Limits and recovery
|
|
67
|
+
|
|
68
|
+
Scoped sessions can switch only to exact scoped aliases.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-multi-codex",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Use multiple ChatGPT Codex OAuth accounts in Pi.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"pack:check": "npm pack --dry-run"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@earendil-works/pi-ai": "^0.85.
|
|
29
|
-
"@earendil-works/pi-coding-agent": "^0.85.
|
|
28
|
+
"@earendil-works/pi-ai": "^0.85.1",
|
|
29
|
+
"@earendil-works/pi-coding-agent": "^0.85.1"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|