[GH-ISSUE #18] Multi-Account Support #15

Closed
opened 2026-02-27 15:37:56 +03:00 by kerem · 4 comments
Owner

Originally created by @david-courtis on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/18

What do you want?

Is it possible to implement support for account switching on quota exhaustion? If we have more than 1 paid google account and we want to change which one we are sending requests to, it is currently a hassle to update the token and refresh token.

Proposed Method:

POST /v1/accounts:

json{
  "accounts": [
    { "state_db": "/mnt/account1/state.vscdb" },
    { "state_db": "/mnt/account2/state.vscdb" },
    { "token": "ya29.xxx" }
  ]
}

Each account can be either a state_db path or a bare token. The proxy cycles through them on quota exhaustion. Cycling should be sticky.
GET /v1/accounts: list registered accounts and their status (active, quota exhausted, token expired, etc.)
DELETE /v1/accounts/{id}: remove an account

Use Case

In the case that a user has more than one pro account, it would be nice to have a fallback account in case the main account's quota is exhausted.

Alternatives Considered

Alternatives:
The current solution is to post a new token, and if refresh capability is needed, restarting the proxy after logging into the different AG account to update the refresh token.

Originally created by @david-courtis on GitHub (Feb 19, 2026). Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/18 ### What do you want? Is it possible to implement support for account switching on quota exhaustion? If we have more than 1 paid google account and we want to change which one we are sending requests to, it is currently a hassle to update the token and refresh token. Proposed Method: POST /v1/accounts: ``` json{ "accounts": [ { "state_db": "/mnt/account1/state.vscdb" }, { "state_db": "/mnt/account2/state.vscdb" }, { "token": "ya29.xxx" } ] } ``` Each account can be either a state_db path or a bare token. The proxy cycles through them on quota exhaustion. Cycling should be sticky. GET /v1/accounts: list registered accounts and their status (active, quota exhausted, token expired, etc.) DELETE /v1/accounts/{id}: remove an account ### Use Case In the case that a user has more than one pro account, it would be nice to have a fallback account in case the main account's quota is exhausted. ### Alternatives Considered Alternatives: The current solution is to post a new token, and if refresh capability is needed, restarting the proxy after logging into the different AG account to update the refresh token.
kerem 2026-02-27 15:37:56 +03:00
Author
Owner

@NikkeTryHard commented on GitHub (Feb 19, 2026):

im struggling to find an robust implementation of this. anyway stability rn is my top priority. PRs are welcome in my private repo if you wanna contribute or anyone reading this wants to contribute

<!-- gh-comment-id:3925164518 --> @NikkeTryHard commented on GitHub (Feb 19, 2026): im struggling to find an robust implementation of this. anyway stability rn is my top priority. PRs are welcome in my private repo if you wanna contribute or anyone reading this wants to contribute
Author
Owner

@david-courtis commented on GitHub (Feb 19, 2026):

im struggling to find an robust implementation of this. anyway stability rn is my top priority. PRs are welcome in my private repo if you wanna contribute or anyone reading this wants to contribute

@NikkeTryHard That's understandable. I am happy to work with you to make some PRs to improve the system. I had a similar idea after learning about the language server binary, so I am glad someone is working on this so I don't need to make it from scratch😄

<!-- gh-comment-id:3925492352 --> @david-courtis commented on GitHub (Feb 19, 2026): > im struggling to find an robust implementation of this. anyway stability rn is my top priority. PRs are welcome in my private repo if you wanna contribute or anyone reading this wants to contribute @NikkeTryHard That's understandable. I am happy to work with you to make some PRs to improve the system. I had a similar idea after learning about the language server binary, so I am glad someone is working on this so I don't need to make it from scratch😄
Author
Owner

@NikkeTryHard commented on GitHub (Feb 19, 2026):

i invited you!

<!-- gh-comment-id:3925559285 --> @NikkeTryHard commented on GitHub (Feb 19, 2026): i invited you!
Author
Owner

@NikkeTryHard commented on GitHub (Feb 20, 2026):

added as in v1.2.0 but currently no pure round rubin for safety concerns

<!-- gh-comment-id:3932284798 --> @NikkeTryHard commented on GitHub (Feb 20, 2026): added as in v1.2.0 but currently no pure round rubin for safety concerns
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zerogravity#15
No description provided.