opencode-antigravity-auth 1.2.9-beta.1 → 1.2.9-beta.10
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 +337 -447
- package/dist/src/constants.d.ts +14 -12
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +14 -13
- package/dist/src/constants.js.map +1 -1
- package/dist/src/plugin/accounts.d.ts +18 -1
- package/dist/src/plugin/accounts.d.ts.map +1 -1
- package/dist/src/plugin/accounts.js +147 -14
- package/dist/src/plugin/accounts.js.map +1 -1
- package/dist/src/plugin/cache/signature-cache.d.ts.map +1 -1
- package/dist/src/plugin/cache/signature-cache.js +2 -0
- package/dist/src/plugin/cache/signature-cache.js.map +1 -1
- package/dist/src/plugin/config/index.d.ts +1 -1
- package/dist/src/plugin/config/index.d.ts.map +1 -1
- package/dist/src/plugin/config/index.js +1 -1
- package/dist/src/plugin/config/index.js.map +1 -1
- package/dist/src/plugin/config/loader.d.ts +2 -0
- package/dist/src/plugin/config/loader.d.ts.map +1 -1
- package/dist/src/plugin/config/loader.js +20 -5
- package/dist/src/plugin/config/loader.js.map +1 -1
- package/dist/src/plugin/config/schema.d.ts +100 -4
- package/dist/src/plugin/config/schema.d.ts.map +1 -1
- package/dist/src/plugin/config/schema.js +64 -7
- package/dist/src/plugin/config/schema.js.map +1 -1
- package/dist/src/plugin/core/streaming/transformer.d.ts.map +1 -1
- package/dist/src/plugin/core/streaming/transformer.js +12 -0
- package/dist/src/plugin/core/streaming/transformer.js.map +1 -1
- package/dist/src/plugin/debug.d.ts.map +1 -1
- package/dist/src/plugin/debug.js +4 -0
- package/dist/src/plugin/debug.js.map +1 -1
- package/dist/src/plugin/image-saver.d.ts +25 -0
- package/dist/src/plugin/image-saver.d.ts.map +1 -0
- package/dist/src/plugin/image-saver.js +86 -0
- package/dist/src/plugin/image-saver.js.map +1 -0
- package/dist/src/plugin/project.d.ts.map +1 -1
- package/dist/src/plugin/project.js +12 -17
- package/dist/src/plugin/project.js.map +1 -1
- package/dist/src/plugin/request-helpers.d.ts +3 -0
- package/dist/src/plugin/request-helpers.d.ts.map +1 -1
- package/dist/src/plugin/request-helpers.js +52 -17
- package/dist/src/plugin/request-helpers.js.map +1 -1
- package/dist/src/plugin/request.d.ts +3 -0
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +111 -145
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/rotation.d.ts +168 -0
- package/dist/src/plugin/rotation.d.ts.map +1 -0
- package/dist/src/plugin/rotation.js +302 -0
- package/dist/src/plugin/rotation.js.map +1 -0
- package/dist/src/plugin/server.d.ts.map +1 -1
- package/dist/src/plugin/server.js +103 -1
- package/dist/src/plugin/server.js.map +1 -1
- package/dist/src/plugin/storage.d.ts +15 -0
- package/dist/src/plugin/storage.d.ts.map +1 -1
- package/dist/src/plugin/storage.js +120 -11
- package/dist/src/plugin/storage.js.map +1 -1
- package/dist/src/plugin/transform/gemini.d.ts +50 -1
- package/dist/src/plugin/transform/gemini.d.ts.map +1 -1
- package/dist/src/plugin/transform/gemini.js +261 -13
- package/dist/src/plugin/transform/gemini.js.map +1 -1
- package/dist/src/plugin/transform/index.d.ts +4 -4
- package/dist/src/plugin/transform/index.d.ts.map +1 -1
- package/dist/src/plugin/transform/index.js +2 -2
- package/dist/src/plugin/transform/index.js.map +1 -1
- package/dist/src/plugin/transform/model-resolver.d.ts +13 -1
- package/dist/src/plugin/transform/model-resolver.d.ts.map +1 -1
- package/dist/src/plugin/transform/model-resolver.js +74 -6
- package/dist/src/plugin/transform/model-resolver.js.map +1 -1
- package/dist/src/plugin/transform/types.d.ts +11 -0
- package/dist/src/plugin/transform/types.d.ts.map +1 -1
- package/dist/src/plugin.d.ts.map +1 -1
- package/dist/src/plugin.js +74 -41
- package/dist/src/plugin.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,24 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/opencode-antigravity-auth)
|
|
4
4
|
[](https://www.npmjs.com/package/opencode-antigravity-auth)
|
|
5
|
+
[](https://www.npmjs.com/package/opencode-antigravity-auth)
|
|
5
6
|
[](LICENSE)
|
|
7
|
+
[](https://x.com/dopesalmon)
|
|
6
8
|
|
|
7
9
|
Enable Opencode to authenticate against **Antigravity** (Google's IDE) via OAuth so you can use Antigravity rate limits and access models like `gemini-3-pro` and `claude-opus-4-5-thinking` with your Google credentials.
|
|
8
10
|
|
|
9
|
-
## What
|
|
11
|
+
## What You Get
|
|
10
12
|
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
|
|
13
|
+
- **Claude Opus 4.5, Sonnet 4.5** and **Gemini 3 Pro/Flash** via Google OAuth
|
|
14
|
+
- **Multi-account support** — add multiple Google accounts, auto-rotates when rate-limited
|
|
15
|
+
- **Dual quota system** — access both Antigravity and Gemini CLI quotas from one plugin
|
|
16
|
+
- **Thinking models** — extended thinking for Claude and Gemini 3 with configurable budgets
|
|
17
|
+
- **Google Search grounding** — enable web search for Gemini models (auto or always-on)
|
|
18
|
+
- **Auto-recovery** — handles session errors and tool failures automatically
|
|
19
|
+
- **Plugin compatible** — works alongside other OpenCode plugins (oh-my-opencode, dcp, etc.)
|
|
20
|
+
|
|
21
|
+
---
|
|
19
22
|
|
|
20
23
|
## Installation
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
<details open>
|
|
26
|
+
<summary><b>For Humans</b></summary>
|
|
23
27
|
|
|
24
28
|
**Option A: Let an LLM do it**
|
|
25
29
|
|
|
@@ -31,42 +35,23 @@ Install the opencode-antigravity-auth plugin and add the Antigravity model defin
|
|
|
31
35
|
|
|
32
36
|
**Option B: Manual setup**
|
|
33
37
|
|
|
34
|
-
1. **Add the plugin to
|
|
38
|
+
1. **Add the plugin** to `~/.config/opencode/opencode.json`:
|
|
35
39
|
|
|
36
40
|
```json
|
|
37
41
|
{
|
|
38
|
-
"plugin": ["opencode-antigravity-auth@
|
|
42
|
+
"plugin": ["opencode-antigravity-auth@latest"]
|
|
39
43
|
}
|
|
40
44
|
```
|
|
41
45
|
|
|
42
|
-
|
|
46
|
+
> Want bleeding-edge features? Use `opencode-antigravity-auth@beta` instead.
|
|
47
|
+
|
|
48
|
+
2. **Login** with your Google account:
|
|
43
49
|
|
|
44
50
|
```bash
|
|
45
51
|
opencode auth login
|
|
46
52
|
```
|
|
47
53
|
|
|
48
|
-
3. **Add models**
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
{
|
|
52
|
-
"plugin": ["opencode-antigravity-auth@beta"],
|
|
53
|
-
"provider": {
|
|
54
|
-
"google": {
|
|
55
|
-
"models": {
|
|
56
|
-
"antigravity-claude-sonnet-4-5-thinking": {
|
|
57
|
-
"name": "Claude Sonnet 4.5 Thinking",
|
|
58
|
-
"limit": { "context": 200000, "output": 64000 },
|
|
59
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
60
|
-
"variants": {
|
|
61
|
-
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
|
|
62
|
-
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
```
|
|
54
|
+
3. **Add models** — copy the [full configuration](#models) below
|
|
70
55
|
|
|
71
56
|
4. **Use it:**
|
|
72
57
|
|
|
@@ -74,97 +59,22 @@ Install the opencode-antigravity-auth plugin and add the Antigravity model defin
|
|
|
74
59
|
opencode run "Hello" --model=google/antigravity-claude-sonnet-4-5-thinking --variant=max
|
|
75
60
|
```
|
|
76
61
|
|
|
62
|
+
</details>
|
|
63
|
+
|
|
77
64
|
<details>
|
|
78
|
-
<summary><b>
|
|
65
|
+
<summary><b>For LLM Agents</b></summary>
|
|
79
66
|
|
|
80
67
|
### Step-by-Step Instructions
|
|
81
68
|
|
|
82
|
-
1. Edit the OpenCode configuration file
|
|
83
|
-
|
|
84
|
-
|
|
69
|
+
1. Edit the OpenCode configuration file at `~/.config/opencode/opencode.json`
|
|
70
|
+
|
|
71
|
+
> **Note**: This path works on all platforms. On Windows, `~` resolves to your user home directory (e.g., `C:\Users\YourName`).
|
|
85
72
|
|
|
86
|
-
2. Add the plugin to the `
|
|
73
|
+
2. Add the plugin to the `plugin` array
|
|
87
74
|
|
|
88
|
-
3.
|
|
75
|
+
3. Add the model definitions from the [Full models configuration](#models) section
|
|
89
76
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Create `~/.config/opencode/opencode.json`:
|
|
93
|
-
```json
|
|
94
|
-
{
|
|
95
|
-
"$schema": "https://opencode.ai/config.json",
|
|
96
|
-
"plugin": ["opencode-antigravity-auth@beta"],
|
|
97
|
-
"provider": {
|
|
98
|
-
"google": {
|
|
99
|
-
"models": {
|
|
100
|
-
"antigravity-gemini-3-pro": {
|
|
101
|
-
"name": "Gemini 3 Pro (Antigravity)",
|
|
102
|
-
"limit": { "context": 1048576, "output": 65535 },
|
|
103
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
104
|
-
"variants": {
|
|
105
|
-
"low": { "thinkingLevel": "low" },
|
|
106
|
-
"high": { "thinkingLevel": "high" }
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
"antigravity-gemini-3-flash": {
|
|
110
|
-
"name": "Gemini 3 Flash (Antigravity)",
|
|
111
|
-
"limit": { "context": 1048576, "output": 65536 },
|
|
112
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
113
|
-
"variants": {
|
|
114
|
-
"minimal": { "thinkingLevel": "minimal" },
|
|
115
|
-
"low": { "thinkingLevel": "low" },
|
|
116
|
-
"medium": { "thinkingLevel": "medium" },
|
|
117
|
-
"high": { "thinkingLevel": "high" }
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"antigravity-claude-sonnet-4-5": {
|
|
121
|
-
"name": "Claude Sonnet 4.5 (Antigravity)",
|
|
122
|
-
"limit": { "context": 200000, "output": 64000 },
|
|
123
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
124
|
-
},
|
|
125
|
-
"antigravity-claude-sonnet-4-5-thinking": {
|
|
126
|
-
"name": "Claude Sonnet 4.5 Thinking (Antigravity)",
|
|
127
|
-
"limit": { "context": 200000, "output": 64000 },
|
|
128
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
129
|
-
"variants": {
|
|
130
|
-
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
|
|
131
|
-
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"antigravity-claude-opus-4-5-thinking": {
|
|
135
|
-
"name": "Claude Opus 4.5 Thinking (Antigravity)",
|
|
136
|
-
"limit": { "context": 200000, "output": 64000 },
|
|
137
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
138
|
-
"variants": {
|
|
139
|
-
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
|
|
140
|
-
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
"gemini-2.5-flash": {
|
|
144
|
-
"name": "Gemini 2.5 Flash (Gemini CLI)",
|
|
145
|
-
"limit": { "context": 1048576, "output": 65536 },
|
|
146
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
147
|
-
},
|
|
148
|
-
"gemini-2.5-pro": {
|
|
149
|
-
"name": "Gemini 2.5 Pro (Gemini CLI)",
|
|
150
|
-
"limit": { "context": 1048576, "output": 65536 },
|
|
151
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
152
|
-
},
|
|
153
|
-
"gemini-3-flash-preview": {
|
|
154
|
-
"name": "Gemini 3 Flash Preview (Gemini CLI)",
|
|
155
|
-
"limit": { "context": 1048576, "output": 65536 },
|
|
156
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
157
|
-
},
|
|
158
|
-
"gemini-3-pro-preview": {
|
|
159
|
-
"name": "Gemini 3 Pro Preview (Gemini CLI)",
|
|
160
|
-
"limit": { "context": 1048576, "output": 65535 },
|
|
161
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
```
|
|
77
|
+
4. Set `provider` to `"google"` and choose a model
|
|
168
78
|
|
|
169
79
|
### Verification
|
|
170
80
|
|
|
@@ -174,47 +84,47 @@ opencode run "Hello" --model=google/antigravity-claude-sonnet-4-5-thinking --var
|
|
|
174
84
|
|
|
175
85
|
</details>
|
|
176
86
|
|
|
177
|
-
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Models
|
|
90
|
+
|
|
91
|
+
### Model Reference
|
|
178
92
|
|
|
179
|
-
|
|
93
|
+
**Antigravity quota** (Claude + Gemini 3):
|
|
180
94
|
|
|
181
|
-
|
|
95
|
+
| Model | Variants | Notes |
|
|
96
|
+
|-------|----------|-------|
|
|
97
|
+
| `antigravity-gemini-3-pro` | low, high | Gemini 3 Pro with thinking |
|
|
98
|
+
| `antigravity-gemini-3-flash` | minimal, low, medium, high | Gemini 3 Flash with thinking |
|
|
99
|
+
| `antigravity-claude-sonnet-4-5` | — | Claude Sonnet 4.5 |
|
|
100
|
+
| `antigravity-claude-sonnet-4-5-thinking` | low, max | Claude Sonnet with extended thinking |
|
|
101
|
+
| `antigravity-claude-opus-4-5-thinking` | low, max | Claude Opus with extended thinking |
|
|
182
102
|
|
|
183
|
-
|
|
184
|
-
|-------|----------|-------------|
|
|
185
|
-
| `google/antigravity-gemini-3-pro` | low, high | Gemini 3 Pro with configurable thinking |
|
|
186
|
-
| `google/antigravity-gemini-3-flash` | minimal, low, medium, high | Gemini 3 Flash with configurable thinking |
|
|
187
|
-
| `google/antigravity-claude-sonnet-4-5` | - | Claude Sonnet 4.5 (no thinking) |
|
|
188
|
-
| `google/antigravity-claude-sonnet-4-5-thinking` | low, max | Claude Sonnet with configurable thinking |
|
|
189
|
-
| `google/antigravity-claude-opus-4-5-thinking` | low, max | Claude Opus with configurable thinking |
|
|
103
|
+
**Gemini CLI quota** (separate from Antigravity):
|
|
190
104
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
105
|
+
| Model | Notes |
|
|
106
|
+
|-------|-------|
|
|
107
|
+
| `gemini-2.5-flash` | Gemini 2.5 Flash |
|
|
108
|
+
| `gemini-2.5-pro` | Gemini 2.5 Pro |
|
|
109
|
+
| `gemini-3-flash-preview` | Gemini 3 Flash (preview) |
|
|
110
|
+
| `gemini-3-pro-preview` | Gemini 3 Pro (preview) |
|
|
194
111
|
|
|
195
|
-
**
|
|
112
|
+
**Using variants:**
|
|
196
113
|
```bash
|
|
197
114
|
opencode run "Hello" --model=google/antigravity-claude-sonnet-4-5-thinking --variant=max
|
|
198
115
|
```
|
|
199
116
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
Models with `-preview` suffix use Gemini CLI quota:
|
|
203
|
-
|
|
204
|
-
| Model | Description |
|
|
205
|
-
|-------|-------------|
|
|
206
|
-
| `google/gemini-2.5-flash` | Gemini 2.5 Flash |
|
|
207
|
-
| `google/gemini-2.5-pro` | Gemini 2.5 Pro |
|
|
208
|
-
| `google/gemini-3-flash-preview` | Gemini 3 Flash (preview) |
|
|
209
|
-
| `google/gemini-3-pro-preview` | Gemini 3 Pro (preview) |
|
|
117
|
+
For details on variant configuration and thinking levels, see [docs/MODEL-VARIANTS.md](docs/MODEL-VARIANTS.md).
|
|
210
118
|
|
|
211
119
|
<details>
|
|
212
120
|
<summary><b>Full models configuration (copy-paste ready)</b></summary>
|
|
213
121
|
|
|
122
|
+
Add this to your `~/.config/opencode/opencode.json`:
|
|
123
|
+
|
|
214
124
|
```json
|
|
215
125
|
{
|
|
216
126
|
"$schema": "https://opencode.ai/config.json",
|
|
217
|
-
"plugin": ["opencode-antigravity-auth@
|
|
127
|
+
"plugin": ["opencode-antigravity-auth@latest"],
|
|
218
128
|
"provider": {
|
|
219
129
|
"google": {
|
|
220
130
|
"models": {
|
|
@@ -239,7 +149,7 @@ Models with `-preview` suffix use Gemini CLI quota:
|
|
|
239
149
|
}
|
|
240
150
|
},
|
|
241
151
|
"antigravity-claude-sonnet-4-5": {
|
|
242
|
-
"name": "Claude Sonnet 4.5 (
|
|
152
|
+
"name": "Claude Sonnet 4.5 (Antigravity)",
|
|
243
153
|
"limit": { "context": 200000, "output": 64000 },
|
|
244
154
|
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
|
|
245
155
|
},
|
|
@@ -289,415 +199,413 @@ Models with `-preview` suffix use Gemini CLI quota:
|
|
|
289
199
|
|
|
290
200
|
</details>
|
|
291
201
|
|
|
292
|
-
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Multi-Account Setup
|
|
205
|
+
|
|
206
|
+
Add multiple Google accounts for higher combined quotas. The plugin automatically rotates between accounts when one is rate-limited.
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
opencode auth login # Run again to add more accounts
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
For details on load balancing, dual quota pools, and account storage, see [docs/MULTI-ACCOUNT.md](docs/MULTI-ACCOUNT.md).
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Troubleshoot
|
|
217
|
+
|
|
218
|
+
> **Quick Reset**: Most issues can be resolved by deleting `~/.config/opencode/antigravity-accounts.json` and running `opencode auth login` again.
|
|
219
|
+
|
|
220
|
+
### Configuration Path (All Platforms)
|
|
221
|
+
|
|
222
|
+
OpenCode uses `~/.config/opencode/` on **all platforms** including Windows.
|
|
223
|
+
|
|
224
|
+
| File | Path |
|
|
225
|
+
|------|------|
|
|
226
|
+
| Main config | `~/.config/opencode/opencode.json` |
|
|
227
|
+
| Accounts | `~/.config/opencode/antigravity-accounts.json` |
|
|
228
|
+
| Plugin config | `~/.config/opencode/antigravity.json` |
|
|
229
|
+
| Debug logs | `~/.config/opencode/antigravity-logs/` |
|
|
230
|
+
|
|
231
|
+
> **Windows users**: `~` resolves to your user home directory (e.g., `C:\Users\YourName`). Do NOT use `%APPDATA%`.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
### Multi-Account Auth Issues
|
|
236
|
+
|
|
237
|
+
If you encounter authentication issues with multiple accounts:
|
|
238
|
+
|
|
239
|
+
1. Delete the accounts file:
|
|
240
|
+
```bash
|
|
241
|
+
rm ~/.config/opencode/antigravity-accounts.json
|
|
242
|
+
```
|
|
243
|
+
2. Re-authenticate:
|
|
244
|
+
```bash
|
|
245
|
+
opencode auth login
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
293
249
|
|
|
294
|
-
|
|
250
|
+
### 403 Permission Denied (`rising-fact-p41fc`)
|
|
295
251
|
|
|
296
|
-
|
|
252
|
+
**Error:**
|
|
253
|
+
```
|
|
254
|
+
Permission 'cloudaicompanion.companions.generateChat' denied on resource
|
|
255
|
+
'//cloudaicompanion.googleapis.com/projects/rising-fact-p41fc/locations/global'
|
|
256
|
+
```
|
|
297
257
|
|
|
298
|
-
|
|
258
|
+
**Cause:** Plugin falls back to a default project ID when no valid project is found. This works for Antigravity but fails for Gemini CLI models.
|
|
299
259
|
|
|
300
|
-
|
|
260
|
+
**Solution:**
|
|
261
|
+
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
|
|
262
|
+
2. Create or select a project
|
|
263
|
+
3. Enable the **Gemini for Google Cloud API** (`cloudaicompanion.googleapis.com`)
|
|
264
|
+
4. Add `projectId` to your accounts file:
|
|
265
|
+
```json
|
|
266
|
+
{
|
|
267
|
+
"accounts": [
|
|
268
|
+
{
|
|
269
|
+
"email": "your@email.com",
|
|
270
|
+
"refreshToken": "...",
|
|
271
|
+
"projectId": "your-project-id"
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
> **Note**: Do this for each account in a multi-account setup.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
### Gemini Model Not Found
|
|
282
|
+
|
|
283
|
+
Add this to your `google` provider config:
|
|
301
284
|
|
|
302
285
|
```json
|
|
303
286
|
{
|
|
304
|
-
"
|
|
305
|
-
"
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
"variants": {
|
|
309
|
-
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
|
|
310
|
-
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
|
|
287
|
+
"provider": {
|
|
288
|
+
"google": {
|
|
289
|
+
"npm": "@ai-sdk/google",
|
|
290
|
+
"models": { ... }
|
|
311
291
|
}
|
|
312
292
|
}
|
|
313
293
|
}
|
|
314
294
|
```
|
|
315
295
|
|
|
316
|
-
|
|
296
|
+
---
|
|
317
297
|
|
|
318
|
-
|
|
298
|
+
### Gemini 3 Models 400 Error ("Unknown name 'parameters'")
|
|
319
299
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
| **Gemini 2.5** | `{ "thinkingConfig": { "thinkingBudget": N } }` |
|
|
300
|
+
**Error:**
|
|
301
|
+
```
|
|
302
|
+
Invalid JSON payload received. Unknown name "parameters" at 'request.tools[0]'
|
|
303
|
+
```
|
|
325
304
|
|
|
326
|
-
|
|
305
|
+
**Causes:**
|
|
306
|
+
- Tool schema incompatibility with Gemini's strict protobuf validation
|
|
307
|
+
- MCP servers with malformed schemas
|
|
308
|
+
- Plugin version regression
|
|
327
309
|
|
|
328
|
-
|
|
310
|
+
**Solutions:**
|
|
311
|
+
1. **Update to latest beta:**
|
|
312
|
+
```json
|
|
313
|
+
{ "plugin": ["opencode-antigravity-auth@beta"] }
|
|
314
|
+
```
|
|
329
315
|
|
|
330
|
-
|
|
331
|
-
|-------|-------|-----|-------------|
|
|
332
|
-
| `minimal` | Yes | No | Minimal thinking, lowest latency |
|
|
333
|
-
| `low` | Yes | Yes | Light thinking |
|
|
334
|
-
| `medium` | Yes | No | Balanced thinking |
|
|
335
|
-
| `high` | Yes | Yes | Maximum thinking (default for both Pro and Flash) |
|
|
316
|
+
2. **Disable MCP servers** one-by-one to find the problematic one
|
|
336
317
|
|
|
337
|
-
|
|
318
|
+
3. **Add npm override:**
|
|
319
|
+
```json
|
|
320
|
+
{ "provider": { "google": { "npm": "@ai-sdk/google" } } }
|
|
321
|
+
```
|
|
338
322
|
|
|
339
|
-
|
|
323
|
+
---
|
|
340
324
|
|
|
341
|
-
|
|
325
|
+
### MCP Servers Causing Errors
|
|
342
326
|
|
|
343
|
-
|
|
344
|
-
|--------------|---------------|
|
|
345
|
-
| ≤ 8192 | low |
|
|
346
|
-
| ≤ 16384 | medium |
|
|
347
|
-
| > 16384 | high |
|
|
327
|
+
Some MCP servers have schemas incompatible with Antigravity's strict JSON format.
|
|
348
328
|
|
|
349
|
-
|
|
329
|
+
**Diagnosis:**
|
|
330
|
+
1. Disable all MCP servers in your config
|
|
331
|
+
2. Enable one-by-one until error reappears
|
|
332
|
+
3. Report the specific MCP in a [GitHub issue](https://github.com/NoeFabris/opencode-antigravity-auth/issues)
|
|
350
333
|
|
|
351
|
-
|
|
352
|
-
- `antigravity-claude-sonnet-4-5-thinking-low`
|
|
353
|
-
- `antigravity-claude-sonnet-4-5-thinking-medium`
|
|
354
|
-
- `antigravity-claude-sonnet-4-5-thinking-high`
|
|
355
|
-
- `antigravity-gemini-3-pro-low`
|
|
356
|
-
- `antigravity-gemini-3-pro-high`
|
|
334
|
+
---
|
|
357
335
|
|
|
358
|
-
|
|
336
|
+
### "All Accounts Rate-Limited" (But Quota Available)
|
|
359
337
|
|
|
360
|
-
|
|
338
|
+
**Cause:** Cascade bug in `clearExpiredRateLimits()` in hybrid mode (fixed in recent beta).
|
|
361
339
|
|
|
362
|
-
|
|
340
|
+
**Solutions:**
|
|
341
|
+
1. Update to latest beta version
|
|
342
|
+
2. If persists, delete accounts file and re-authenticate
|
|
343
|
+
3. Try switching `account_selection_strategy` to `"sticky"` in `antigravity.json`
|
|
363
344
|
|
|
364
|
-
|
|
365
|
-
opencode auth login
|
|
366
|
-
```
|
|
345
|
+
---
|
|
367
346
|
|
|
368
|
-
|
|
369
|
-
<summary><b>How multi-account works</b></summary>
|
|
347
|
+
### Session Recovery
|
|
370
348
|
|
|
371
|
-
|
|
349
|
+
If you encounter errors during a session:
|
|
350
|
+
1. Type `continue` to trigger the recovery mechanism
|
|
351
|
+
2. If blocked, use `/undo` to revert to pre-error state
|
|
352
|
+
3. Retry the operation
|
|
372
353
|
|
|
373
|
-
|
|
374
|
-
- **Per-model-family limits** - Rate limits tracked separately for Claude and Gemini models
|
|
375
|
-
- **Dual quota pools for Gemini** - Automatic fallback between Antigravity quota and Gemini CLI quota before switching accounts
|
|
376
|
-
- **Smart retry threshold** - Short rate limits (≤5s) are retried on same account
|
|
377
|
-
- **Exponential backoff** - Increasing delays for consecutive rate limits
|
|
354
|
+
---
|
|
378
355
|
|
|
379
|
-
###
|
|
356
|
+
### Using with Oh-My-OpenCode
|
|
380
357
|
|
|
381
|
-
|
|
358
|
+
**Important:** Disable the built-in Google auth to prevent conflicts:
|
|
382
359
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
360
|
+
```json
|
|
361
|
+
// ~/.config/opencode/oh-my-opencode.json
|
|
362
|
+
{
|
|
363
|
+
"google_auth": false,
|
|
364
|
+
"agents": {
|
|
365
|
+
"frontend-ui-ux-engineer": { "model": "google/antigravity-gemini-3-pro" },
|
|
366
|
+
"document-writer": { "model": "google/antigravity-gemini-3-flash" }
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
```
|
|
387
370
|
|
|
388
|
-
|
|
371
|
+
---
|
|
389
372
|
|
|
390
|
-
###
|
|
373
|
+
### Infinite `.tmp` Files Created
|
|
391
374
|
|
|
392
|
-
When
|
|
375
|
+
**Cause:** When account is rate-limited and plugin retries infinitely, it creates many temp files.
|
|
393
376
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
377
|
+
**Workaround:**
|
|
378
|
+
1. Stop OpenCode
|
|
379
|
+
2. Clean up: `rm ~/.config/opencode/*.tmp`
|
|
380
|
+
3. Add more accounts or wait for rate limit to expire
|
|
398
381
|
|
|
399
|
-
|
|
400
|
-
```
|
|
382
|
+
---
|
|
401
383
|
|
|
402
|
-
###
|
|
384
|
+
### OAuth Callback Issues
|
|
403
385
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
- If Google revokes a token (`invalid_grant`), that account is automatically removed
|
|
386
|
+
<details>
|
|
387
|
+
<summary><b>Safari OAuth Callback Fails (macOS)</b></summary>
|
|
407
388
|
|
|
408
|
-
|
|
389
|
+
**Symptoms:**
|
|
390
|
+
- "fail to authorize" after successful Google login
|
|
391
|
+
- Safari shows "Safari can't open the page"
|
|
409
392
|
|
|
410
|
-
|
|
393
|
+
**Cause:** Safari's "HTTPS-Only Mode" blocks `http://localhost` callback.
|
|
411
394
|
|
|
412
|
-
|
|
395
|
+
**Solutions:**
|
|
413
396
|
|
|
414
|
-
|
|
397
|
+
1. **Use Chrome or Firefox** (easiest):
|
|
398
|
+
Copy the OAuth URL and paste into a different browser.
|
|
415
399
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
| `auto_update` | `true` | Enable automatic plugin updates |
|
|
400
|
+
2. **Disable HTTPS-Only Mode temporarily:**
|
|
401
|
+
- Safari > Settings (⌘,) > Privacy
|
|
402
|
+
- Uncheck "Enable HTTPS-Only Mode"
|
|
403
|
+
- Run `opencode auth login`
|
|
404
|
+
- Re-enable after authentication
|
|
422
405
|
|
|
423
|
-
|
|
406
|
+
</details>
|
|
424
407
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
| `session_recovery` | `true` | Auto-recover from tool_result_missing errors |
|
|
428
|
-
| `auto_resume` | `true` | Auto-send resume prompt after recovery |
|
|
429
|
-
| `resume_text` | `"continue"` | Text to send when auto-resuming |
|
|
408
|
+
<details>
|
|
409
|
+
<summary><b>Port Conflict (Address Already in Use)</b></summary>
|
|
430
410
|
|
|
431
|
-
|
|
411
|
+
**macOS / Linux:**
|
|
412
|
+
```bash
|
|
413
|
+
# Find process using the port
|
|
414
|
+
lsof -i :51121
|
|
432
415
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
| `empty_response_max_attempts` | `4` | Retries for empty API responses |
|
|
436
|
-
| `empty_response_retry_delay_ms` | `2000` | Delay between retries |
|
|
437
|
-
| `tool_id_recovery` | `true` | Fix mismatched tool IDs from context compaction |
|
|
438
|
-
| `claude_tool_hardening` | `true` | Prevent tool parameter hallucination |
|
|
416
|
+
# Kill if stale
|
|
417
|
+
kill -9 <PID>
|
|
439
418
|
|
|
440
|
-
|
|
419
|
+
# Retry
|
|
420
|
+
opencode auth login
|
|
421
|
+
```
|
|
441
422
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
| `switch_on_first_rate_limit` | `true` | Switch account immediately on first 429 (after 1s) |
|
|
423
|
+
**Windows (PowerShell):**
|
|
424
|
+
```powershell
|
|
425
|
+
netstat -ano | findstr :51121
|
|
426
|
+
taskkill /PID <PID> /F
|
|
427
|
+
opencode auth login
|
|
428
|
+
```
|
|
449
429
|
|
|
450
|
-
|
|
430
|
+
</details>
|
|
451
431
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
| `account_selection_strategy` | `"sticky"` | Strategy for distributing requests across accounts |
|
|
455
|
-
| `pid_offset_enabled` | `false` | Use PID-based offset for multi-session distribution |
|
|
432
|
+
<details>
|
|
433
|
+
<summary><b>Docker / WSL2 / Remote Development</b></summary>
|
|
456
434
|
|
|
457
|
-
|
|
435
|
+
OAuth callback requires browser to reach `localhost` on the machine running OpenCode.
|
|
458
436
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
| `round-robin` | Rotate to next account on every request | Maximum throughput |
|
|
463
|
-
| `hybrid` | Touch all fresh accounts first, then sticky | Sync reset timers + cache |
|
|
437
|
+
**WSL2:**
|
|
438
|
+
- Use VS Code's port forwarding, or
|
|
439
|
+
- Configure Windows → WSL port forwarding
|
|
464
440
|
|
|
465
|
-
**
|
|
441
|
+
**SSH / Remote:**
|
|
442
|
+
```bash
|
|
443
|
+
ssh -L 51121:localhost:51121 user@remote
|
|
444
|
+
```
|
|
466
445
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
| `QUOTA_EXCEEDED` | Switch to next available account immediately |
|
|
446
|
+
**Docker / Containers:**
|
|
447
|
+
- OAuth with localhost redirect doesn't work in containers
|
|
448
|
+
- Wait 30s for manual URL flow, or use SSH port forwarding
|
|
471
449
|
|
|
472
|
-
|
|
450
|
+
</details>
|
|
473
451
|
|
|
474
|
-
|
|
452
|
+
---
|
|
475
453
|
|
|
476
|
-
|
|
477
|
-
OPENCODE_ANTIGRAVITY_QUIET=1 # quiet_mode
|
|
478
|
-
OPENCODE_ANTIGRAVITY_DEBUG=1 # debug
|
|
479
|
-
OPENCODE_ANTIGRAVITY_LOG_DIR=/path # log_dir
|
|
480
|
-
OPENCODE_ANTIGRAVITY_KEEP_THINKING=1 # keep_thinking
|
|
481
|
-
OPENCODE_ANTIGRAVITY_ACCOUNT_SELECTION_STRATEGY=round-robin # account_selection_strategy
|
|
482
|
-
OPENCODE_ANTIGRAVITY_PID_OFFSET_ENABLED=1 # pid_offset_enabled
|
|
483
|
-
```
|
|
454
|
+
### Configuration Key Typo: `plugin` not `plugins`
|
|
484
455
|
|
|
485
|
-
|
|
486
|
-
<summary><b>Full configuration example</b></summary>
|
|
456
|
+
The correct key is `plugin` (singular):
|
|
487
457
|
|
|
488
458
|
```json
|
|
489
459
|
{
|
|
490
|
-
"
|
|
491
|
-
"quiet_mode": false,
|
|
492
|
-
"debug": false,
|
|
493
|
-
"log_dir": "/custom/log/path",
|
|
494
|
-
"auto_update": true,
|
|
495
|
-
"keep_thinking": false,
|
|
496
|
-
"session_recovery": true,
|
|
497
|
-
"auto_resume": true,
|
|
498
|
-
"resume_text": "continue",
|
|
499
|
-
"empty_response_max_attempts": 4,
|
|
500
|
-
"empty_response_retry_delay_ms": 2000,
|
|
501
|
-
"tool_id_recovery": true,
|
|
502
|
-
"claude_tool_hardening": true,
|
|
503
|
-
"proactive_token_refresh": true,
|
|
504
|
-
"proactive_refresh_buffer_seconds": 1800,
|
|
505
|
-
"proactive_refresh_check_interval_seconds": 300,
|
|
506
|
-
"max_rate_limit_wait_seconds": 300,
|
|
507
|
-
"quota_fallback": false,
|
|
508
|
-
"account_selection_strategy": "sticky",
|
|
509
|
-
"pid_offset_enabled": false,
|
|
510
|
-
"signature_cache": {
|
|
511
|
-
"enabled": true,
|
|
512
|
-
"memory_ttl_seconds": 3600,
|
|
513
|
-
"disk_ttl_seconds": 172800,
|
|
514
|
-
"write_interval_seconds": 60
|
|
515
|
-
}
|
|
460
|
+
"plugin": ["opencode-antigravity-auth@beta"]
|
|
516
461
|
}
|
|
517
462
|
```
|
|
518
463
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
## Troubleshoot
|
|
464
|
+
**Not** `"plugins"` (will cause "Unrecognized key" error).
|
|
522
465
|
|
|
523
|
-
|
|
524
|
-
If you encounter auth issue please try remove `antigravity-account.json` and auth again
|
|
466
|
+
---
|
|
525
467
|
|
|
526
|
-
###
|
|
527
|
-
Try add this line to in `google` field under `provider`
|
|
528
|
-
`"npm": "@ai-sdk/google"`
|
|
468
|
+
### Migrating Accounts Between Machines
|
|
529
469
|
|
|
530
|
-
|
|
531
|
-
|
|
470
|
+
When copying `antigravity-accounts.json` to a new machine:
|
|
471
|
+
1. Ensure the plugin is installed: `"plugin": ["opencode-antigravity-auth@beta"]`
|
|
472
|
+
2. Copy `~/.config/opencode/antigravity-accounts.json`
|
|
473
|
+
3. If you get "API key missing" error, the refresh token may be invalid — re-authenticate
|
|
532
474
|
|
|
533
475
|
## Known Plugin Interactions
|
|
476
|
+
For details on load balancing, dual quota pools, and account storage, see [docs/MULTI-ACCOUNT.md](docs/MULTI-ACCOUNT.md).
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## Plugin Compatibility
|
|
534
481
|
|
|
535
482
|
### @tarquinen/opencode-dcp
|
|
536
483
|
|
|
537
|
-
DCP creates synthetic assistant messages that lack thinking blocks. **
|
|
484
|
+
DCP creates synthetic assistant messages that lack thinking blocks. **List this plugin BEFORE DCP:**
|
|
538
485
|
|
|
539
486
|
```json
|
|
540
487
|
{
|
|
541
488
|
"plugin": [
|
|
542
|
-
"opencode-antigravity-auth@
|
|
543
|
-
"@tarquinen/opencode-dcp@latest"
|
|
489
|
+
"opencode-antigravity-auth@latest",
|
|
490
|
+
"@tarquinen/opencode-dcp@latest"
|
|
544
491
|
]
|
|
545
492
|
}
|
|
546
493
|
```
|
|
547
494
|
|
|
548
495
|
### oh-my-opencode
|
|
549
|
-
|
|
496
|
+
|
|
497
|
+
Disable built-in auth and override agent models in `oh-my-opencode.json`:
|
|
498
|
+
|
|
550
499
|
```json
|
|
551
500
|
{
|
|
552
501
|
"google_auth": false,
|
|
553
502
|
"agents": {
|
|
554
|
-
"frontend-ui-ux-engineer": { "model": "google/gemini-3-pro
|
|
555
|
-
"document-writer": { "model": "google/gemini-3-flash" },
|
|
556
|
-
"multimodal-looker": { "model": "google/gemini-3-flash" }
|
|
503
|
+
"frontend-ui-ux-engineer": { "model": "google/antigravity-gemini-3-pro" },
|
|
504
|
+
"document-writer": { "model": "google/antigravity-gemini-3-flash" },
|
|
505
|
+
"multimodal-looker": { "model": "google/antigravity-gemini-3-flash" }
|
|
557
506
|
}
|
|
558
507
|
}
|
|
559
508
|
```
|
|
560
509
|
|
|
561
|
-
When spawning parallel subagents,
|
|
562
|
-
|
|
563
|
-
### Plugins You Don't Need
|
|
510
|
+
> **Tip:** When spawning parallel subagents, enable `pid_offset_enabled: true` in `antigravity.json` to distribute sessions across accounts.
|
|
564
511
|
|
|
565
|
-
|
|
512
|
+
### Plugins you don't need
|
|
566
513
|
|
|
567
|
-
|
|
568
|
-
<summary><b>Migration Guide (v1.2.8+ - Variants)</b></summary>
|
|
514
|
+
- **gemini-auth plugins** — Not needed. This plugin handles all Google OAuth.
|
|
569
515
|
|
|
570
|
-
|
|
516
|
+
---
|
|
571
517
|
|
|
572
|
-
|
|
518
|
+
## Configuration
|
|
573
519
|
|
|
574
|
-
|
|
520
|
+
Create `~/.config/opencode/antigravity.json` for optional settings:
|
|
575
521
|
|
|
576
522
|
```json
|
|
577
523
|
{
|
|
578
|
-
"antigravity-
|
|
579
|
-
"antigravity-claude-sonnet-4-5-thinking-medium": { ... },
|
|
580
|
-
"antigravity-claude-sonnet-4-5-thinking-high": { ... }
|
|
524
|
+
"$schema": "https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/main/assets/antigravity.schema.json"
|
|
581
525
|
}
|
|
582
526
|
```
|
|
583
527
|
|
|
584
|
-
|
|
528
|
+
Most users don't need to configure anything — defaults work well.
|
|
585
529
|
|
|
586
|
-
|
|
587
|
-
{
|
|
588
|
-
"antigravity-claude-sonnet-4-5-thinking": {
|
|
589
|
-
"name": "Claude Sonnet 4.5 Thinking",
|
|
590
|
-
"limit": { "context": 200000, "output": 64000 },
|
|
591
|
-
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
592
|
-
"variants": {
|
|
593
|
-
"low": { "thinkingConfig": { "thinkingBudget": 8192 } },
|
|
594
|
-
"max": { "thinkingConfig": { "thinkingBudget": 32768 } }
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
```
|
|
530
|
+
### Model Behavior
|
|
599
531
|
|
|
600
|
-
|
|
532
|
+
| Option | Default | What it does |
|
|
533
|
+
|--------|---------|--------------
|
|
534
|
+
| `keep_thinking` | `false` | Preserve Claude's thinking across turns. **Warning:** enabling may degrade model stability. |
|
|
535
|
+
| `session_recovery` | `true` | Auto-recover from tool errors |
|
|
536
|
+
| `web_search.default_mode` | `"off"` | Gemini Google Search: `"auto"` or `"off"` |
|
|
601
537
|
|
|
602
|
-
|
|
603
|
-
- **Flexible budgets** - Define any budget, not just low/max
|
|
604
|
-
- **Future-proof** - Works with OpenCode's native variant system
|
|
538
|
+
### Account Rotation
|
|
605
539
|
|
|
606
|
-
|
|
540
|
+
| Your Setup | Recommended Config |
|
|
541
|
+
|------------|-------------------|
|
|
542
|
+
| **1 account** | `"account_selection_strategy": "sticky"` |
|
|
543
|
+
| **2-5 accounts** | Default (`"hybrid"`) works great |
|
|
544
|
+
| **5+ accounts** | `"account_selection_strategy": "round-robin"` |
|
|
545
|
+
| **Parallel agents** | Add `"pid_offset_enabled": true` |
|
|
607
546
|
|
|
608
|
-
|
|
547
|
+
### App Behavior
|
|
609
548
|
|
|
610
|
-
|
|
549
|
+
| Option | Default | What it does |
|
|
550
|
+
|--------|---------|--------------|
|
|
551
|
+
| `quiet_mode` | `false` | Hide toast notifications |
|
|
552
|
+
| `debug` | `false` | Enable debug logging |
|
|
553
|
+
| `auto_update` | `true` | Auto-update plugin |
|
|
611
554
|
|
|
612
|
-
|
|
613
|
-
<summary><b>Migration Guide (v1.2.7 - Prefix)</b></summary>
|
|
614
|
-
|
|
615
|
-
If upgrading from v1.2.6 or earlier:
|
|
616
|
-
|
|
617
|
-
### What Changed
|
|
618
|
-
|
|
619
|
-
v1.2.7+ uses explicit prefixes to distinguish quota sources:
|
|
620
|
-
|
|
621
|
-
| Model Type | New Name (Recommended) | Old Name (Still Works) |
|
|
622
|
-
|------------|------------------------|------------------------|
|
|
623
|
-
| Gemini 3 (Antigravity) | `antigravity-gemini-3-pro` | `gemini-3-pro-low` |
|
|
624
|
-
| Gemini 3 (CLI) | `gemini-3-pro-preview` | N/A |
|
|
625
|
-
| Claude | `antigravity-claude-sonnet-4-5` | `claude-sonnet-4-5` |
|
|
626
|
-
|
|
627
|
-
### Action Required
|
|
628
|
-
|
|
629
|
-
**Update your config to use `antigravity-` prefix:**
|
|
630
|
-
|
|
631
|
-
```diff
|
|
632
|
-
- "gemini-3-pro-low": { ... }
|
|
633
|
-
+ "antigravity-gemini-3-pro": { ... }
|
|
634
|
-
```
|
|
635
|
-
|
|
636
|
-
> **Why update?** Old names work now as a fallback, but this depends on Gemini CLI using `-preview` suffix. If Google removes `-preview` in the future, old names may route to the wrong quota. The `antigravity-` prefix is explicit and stable.
|
|
637
|
-
|
|
638
|
-
### Step 1: Clear Old Tokens (Optional - do this if you have issues calling models)
|
|
555
|
+
For all options, see [docs/CONFIGURATION.md](docs/CONFIGURATION.md).
|
|
639
556
|
|
|
557
|
+
**Environment variables:**
|
|
640
558
|
```bash
|
|
641
|
-
|
|
642
|
-
opencode
|
|
559
|
+
OPENCODE_ANTIGRAVITY_DEBUG=1 opencode # Enable debug logging
|
|
560
|
+
OPENCODE_ANTIGRAVITY_DEBUG=2 opencode # Verbose logging
|
|
643
561
|
```
|
|
644
562
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
Models now use `antigravity-` prefix for Antigravity quota. See [Available Models](#available-models).
|
|
648
|
-
|
|
649
|
-
### Step 3: Create antigravity.json (Optional)
|
|
563
|
+
---
|
|
650
564
|
|
|
651
|
-
|
|
652
|
-
{
|
|
653
|
-
"$schema": "https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/main/assets/antigravity.schema.json",
|
|
654
|
-
"quiet_mode": false,
|
|
655
|
-
"debug": false
|
|
656
|
-
}
|
|
657
|
-
```
|
|
565
|
+
## Troubleshooting
|
|
658
566
|
|
|
659
|
-
|
|
567
|
+
See the full [Troubleshooting Guide](docs/TROUBLESHOOTING.md) for solutions to common issues including:
|
|
660
568
|
|
|
661
|
-
|
|
662
|
-
|
|
569
|
+
- Auth problems and token refresh
|
|
570
|
+
- "Model not found" errors
|
|
571
|
+
- Session recovery
|
|
572
|
+
- Gemini CLI permission errors
|
|
573
|
+
- Safari OAuth issues
|
|
574
|
+
- Plugin compatibility
|
|
575
|
+
- Migration guides
|
|
663
576
|
|
|
664
|
-
|
|
577
|
+
---
|
|
665
578
|
|
|
666
|
-
|
|
667
|
-
# Sanity tests (7 tests, ~5 min)
|
|
668
|
-
npx tsx script/test-regression.ts --sanity
|
|
579
|
+
## Documentation
|
|
669
580
|
|
|
670
|
-
|
|
671
|
-
|
|
581
|
+
- [Configuration](docs/CONFIGURATION.md) — All configuration options
|
|
582
|
+
- [Multi-Account](docs/MULTI-ACCOUNT.md) — Load balancing, dual quota pools, account storage
|
|
583
|
+
- [Model Variants](docs/MODEL-VARIANTS.md) — Thinking budgets and variant system
|
|
584
|
+
- [Troubleshooting](docs/TROUBLESHOOTING.md) — Common issues and fixes
|
|
585
|
+
- [Architecture](docs/ARCHITECTURE.md) — How the plugin works
|
|
586
|
+
- [API Spec](docs/ANTIGRAVITY_API_SPEC.md) — Antigravity API reference
|
|
672
587
|
|
|
673
|
-
|
|
674
|
-
npx tsx script/test-regression.ts --category concurrency
|
|
588
|
+
---
|
|
675
589
|
|
|
676
|
-
|
|
677
|
-
npx tsx script/test-regression.ts --test thinking-tool-use
|
|
590
|
+
## Support
|
|
678
591
|
|
|
679
|
-
|
|
680
|
-
npx tsx script/test-regression.ts --dry-run
|
|
681
|
-
```
|
|
592
|
+
If this plugin helps you, consider supporting its maintenance:
|
|
682
593
|
|
|
683
|
-
|
|
594
|
+
[](https://ko-fi.com/S6S81QBOIR)
|
|
684
595
|
|
|
685
|
-
|
|
596
|
+
---
|
|
686
597
|
|
|
687
|
-
|
|
688
|
-
OPENCODE_ANTIGRAVITY_DEBUG=1 opencode # Basic logging
|
|
689
|
-
OPENCODE_ANTIGRAVITY_DEBUG=2 opencode # Verbose (full request/response bodies)
|
|
690
|
-
```
|
|
598
|
+
## Credits
|
|
691
599
|
|
|
692
|
-
|
|
600
|
+
- [opencode-gemini-auth](https://github.com/jenslys/opencode-gemini-auth) by [@jenslys](https://github.com/jenslys)
|
|
601
|
+
- [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)
|
|
693
602
|
|
|
694
|
-
##
|
|
603
|
+
## License
|
|
695
604
|
|
|
696
|
-
|
|
697
|
-
- [API Spec](docs/ANTIGRAVITY_API_SPEC.md) - Antigravity API reference
|
|
605
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
698
606
|
|
|
699
607
|
<details>
|
|
700
|
-
<summary><b>
|
|
608
|
+
<summary><b>Legal</b></summary>
|
|
701
609
|
|
|
702
610
|
### Intended Use
|
|
703
611
|
|
|
@@ -705,36 +613,18 @@ Logs are written to `~/.config/opencode/antigravity-logs/`.
|
|
|
705
613
|
- Respect internal quotas and data handling policies
|
|
706
614
|
- Not for production services or bypassing intended limits
|
|
707
615
|
|
|
708
|
-
### Warning
|
|
616
|
+
### Warning
|
|
709
617
|
|
|
710
618
|
By using this plugin, you acknowledge:
|
|
711
619
|
|
|
712
|
-
- **Terms of Service risk**
|
|
713
|
-
- **Account risk**
|
|
714
|
-
- **No guarantees**
|
|
715
|
-
- **Assumption of risk**
|
|
620
|
+
- **Terms of Service risk** — This approach may violate ToS of AI model providers
|
|
621
|
+
- **Account risk** — Providers may suspend or ban accounts
|
|
622
|
+
- **No guarantees** — APIs may change without notice
|
|
623
|
+
- **Assumption of risk** — You assume all legal, financial, and technical risks
|
|
716
624
|
|
|
717
|
-
###
|
|
625
|
+
### Disclaimer
|
|
718
626
|
|
|
719
627
|
- Not affiliated with Google. This is an independent open-source project.
|
|
720
628
|
- "Antigravity", "Gemini", "Google Cloud", and "Google" are trademarks of Google LLC.
|
|
721
|
-
- Software is provided "as is", without warranty.
|
|
722
629
|
|
|
723
630
|
</details>
|
|
724
|
-
|
|
725
|
-
## Credits
|
|
726
|
-
|
|
727
|
-
Built with help from:
|
|
728
|
-
|
|
729
|
-
- [opencode-gemini-auth](https://github.com/jenslys/opencode-gemini-auth) - Gemini OAuth groundwork by [@jenslys](https://github.com/jenslys)
|
|
730
|
-
- [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) - Antigravity API reference
|
|
731
|
-
|
|
732
|
-
## Support
|
|
733
|
-
|
|
734
|
-
If this plugin helps you, consider supporting its continued maintenance:
|
|
735
|
-
|
|
736
|
-
[](https://ko-fi.com/S6S81QBOIR)
|
|
737
|
-
|
|
738
|
-
## License
|
|
739
|
-
|
|
740
|
-
MIT
|