opencode-codex-auth-rotation 1.0.0 → 1.0.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/README.md +19 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
**
|
|
5
|
-
[](https://www.npmjs.com/package/opencode-openai-codex-auth)
|
|
9
|
-
**One install. Every Codex model.**
|
|
4
|
+
**Forked from [Numman Ali](https://x.com/nummanali)'s opencode-openai-codex-auth with multi-account rotation support**
|
|
5
|
+
[](https://www.npmjs.com/package/opencode-codex-auth-rotation)
|
|
6
|
+
[](https://www.npmjs.com/package/opencode-codex-auth-rotation)
|
|
7
|
+
**One install. Every Codex model. Multi-account rotation.**
|
|
10
8
|
[Install](#-quick-start) · [Models](#-models) · [Configuration](#-configuration) · [Docs](#-docs)
|
|
11
9
|
|
|
12
10
|
---
|
|
@@ -24,7 +22,7 @@ OpenCode should feel effortless. This plugin keeps the setup minimal while givin
|
|
|
24
22
|
---
|
|
25
23
|
## 🚀 Quick Start
|
|
26
24
|
```bash
|
|
27
|
-
npx -y opencode-
|
|
25
|
+
npx -y opencode-codex-auth-rotation@latest
|
|
28
26
|
```
|
|
29
27
|
Then:
|
|
30
28
|
```bash
|
|
@@ -33,13 +31,13 @@ opencode run "write hello world to test.txt" --model=openai/gpt-5.2 --variant=me
|
|
|
33
31
|
```
|
|
34
32
|
Legacy OpenCode (v1.0.209 and below):
|
|
35
33
|
```bash
|
|
36
|
-
npx -y opencode-
|
|
34
|
+
npx -y opencode-codex-auth-rotation@latest --legacy
|
|
37
35
|
opencode run "write hello world to test.txt" --model=openai/gpt-5.2-medium
|
|
38
36
|
```
|
|
39
37
|
Uninstall:
|
|
40
38
|
```bash
|
|
41
|
-
npx -y opencode-
|
|
42
|
-
npx -y opencode-
|
|
39
|
+
npx -y opencode-codex-auth-rotation@latest --uninstall
|
|
40
|
+
npx -y opencode-codex-auth-rotation@latest --uninstall --all
|
|
43
41
|
```
|
|
44
42
|
---
|
|
45
43
|
## 📦 Models
|
|
@@ -77,7 +75,8 @@ This plugin supports **multiple ChatGPT accounts** for automatic failover when r
|
|
|
77
75
|
|
|
78
76
|
Account credentials are stored in `~/.config/opencode/codex-accounts.json`:
|
|
79
77
|
|
|
80
|
-
```
|
|
78
|
+
```jsonc
|
|
79
|
+
// ~/.config/opencode/codex-accounts.json
|
|
81
80
|
{
|
|
82
81
|
"version": 1,
|
|
83
82
|
"accounts": [
|
|
@@ -104,7 +103,7 @@ Account credentials are stored in `~/.config/opencode/codex-accounts.json`:
|
|
|
104
103
|
|
|
105
104
|
### Account Rotation Strategies
|
|
106
105
|
|
|
107
|
-
The plugin supports
|
|
106
|
+
The plugin supports two rotation strategies:
|
|
108
107
|
|
|
109
108
|
| Strategy | Description | Best For |
|
|
110
109
|
|----------|-------------|----------|
|
|
@@ -113,6 +112,13 @@ The plugin supports three rotation strategies:
|
|
|
113
112
|
|
|
114
113
|
Environment variable: `CODEX_ACCOUNT_STRATEGY=sticky|round-robin`
|
|
115
114
|
|
|
115
|
+
Plugin config (`~/.opencode/openai-codex-auth-config.json`):
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"strategy": "round-robin"
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
116
122
|
## 🔄 Usage-Based Account Selection
|
|
117
123
|
|
|
118
124
|
This plugin selects accounts based on actual ChatGPT usage data from the `/wham/usage` API.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-codex-auth-rotation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "OpenAI ChatGPT (Codex backend) OAuth auth plugin for opencode with multi-account rotation - use your ChatGPT Plus/Pro subscription instead of API credits",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|