You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -327,6 +327,7 @@ The proxy reads accounts from `accounts.json` in the config directory:
327
327
|`ZEROGRAVITY_SYSTEM_MODE`|`stealth`|`stealth` = keep backend prompt, inject user system prompt as override; `minimal` = replace 20KB prompt with minimal identity + user prompt |
328
328
|`ZEROGRAVITY_SENSITIVE_WORDS`| built-in list | Comma-separated client names to obfuscate in requests (zero-width spaces), or `none` to disable |
329
329
|`ZEROGRAVITY_MODEL_ALIASES`| — | Map custom model names to built-in models, e.g. `gpt-4o:gemini-3-flash,gpt-4:opus-4.6`. Also configurable via `zg alias` or `aliases.json`|
330
+
|`ZEROGRAVITY_API_BODY_LIMIT_MB`|`32` (clamped `1..100`) | Max request body size in MiB for API routes (`/v1/*`) |`64`|
330
331
331
332
**System prompt mode:** When your client sends a system prompt (e.g. via OpenAI `system` role), ZeroGravity injects it into the request. In `stealth` mode, the backend's identity is stripped and your prompt takes over. In `minimal` mode, the entire 20KB backend prompt is replaced — saves tokens but may trigger rate limiting on Pro models.
Switches the active account immediately without restarting the proxy process manually.
122
+
123
+
```bash
124
+
curl -X POST http://localhost:8741/v1/accounts/set_active \
125
+
-H "Content-Type: application/json" \
126
+
-d '{"email": "user@gmail.com"}'
127
+
```
128
+
119
129
### Account Rotation
120
130
121
131
When running with 2+ accounts, the proxy **automatically rotates** to the next account when:
@@ -128,7 +138,7 @@ The rotation:
128
138
- Waits a short cooldown (5–10s with jitter)
129
139
- Refreshes the next account's access token via OAuth
130
140
- Restarts the backend to get a clean session
131
-
-Clears all rate limiter state
141
+
-Resets cooldown windows while preserving exhaustion counters
132
142
133
143
Use `--quota-cap 0.2` (default) or set `ZEROGRAVITY_QUOTA_CAP=0.2` to rotate proactively when any model exceeds 80% usage. When all accounts are exhausted, the proxy parks and waits for quota to reset. Set to `0` to disable proactive rotation.
0 commit comments