docs: replace round-robin references with sticky selection
The account selection is now sticky (stays on same account for cache continuity), not round-robin. Updated comments and docs to reflect this. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -50,7 +50,7 @@ Claude Code CLI → Express Server (server.js) → CloudCode Client → Antigrav
|
|||||||
- **src/server.js**: Express server exposing Anthropic-compatible endpoints (`/v1/messages`, `/v1/models`, `/health`, `/accounts`)
|
- **src/server.js**: Express server exposing Anthropic-compatible endpoints (`/v1/messages`, `/v1/models`, `/health`, `/accounts`)
|
||||||
- **src/cloudcode-client.js**: Makes requests to Antigravity Cloud Code API with retry/failover logic, handles both streaming and non-streaming
|
- **src/cloudcode-client.js**: Makes requests to Antigravity Cloud Code API with retry/failover logic, handles both streaming and non-streaming
|
||||||
- **src/format-converter.js**: Bidirectional conversion between Anthropic and Google Generative AI formats, including thinking blocks and tool calls
|
- **src/format-converter.js**: Bidirectional conversion between Anthropic and Google Generative AI formats, including thinking blocks and tool calls
|
||||||
- **src/account-manager.js**: Multi-account pool with round-robin rotation, rate limit handling, and automatic cooldown
|
- **src/account-manager.js**: Multi-account pool with sticky selection, rate limit handling, and automatic cooldown
|
||||||
- **src/oauth.js**: Google OAuth implementation for adding accounts
|
- **src/oauth.js**: Google OAuth implementation for adding accounts
|
||||||
- **src/token-extractor.js**: Extracts tokens from local Antigravity app installation (legacy single-account mode)
|
- **src/token-extractor.js**: Extracts tokens from local Antigravity app installation (legacy single-account mode)
|
||||||
- **src/constants.js**: API endpoints, model mappings, OAuth config, and all configuration values
|
- **src/constants.js**: API endpoints, model mappings, OAuth config, and all configuration values
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ If you have Antigravity installed and logged in, the proxy will automatically ex
|
|||||||
|
|
||||||
**Option B: Add Google Accounts via OAuth (Recommended for Multi-Account)**
|
**Option B: Add Google Accounts via OAuth (Recommended for Multi-Account)**
|
||||||
|
|
||||||
Add one or more Google accounts for round-robin load balancing:
|
Add one or more Google accounts for load balancing:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run accounts:add
|
npm run accounts:add
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Account Manager
|
* Account Manager
|
||||||
* Manages multiple Antigravity accounts with round-robin selection,
|
* Manages multiple Antigravity accounts with sticky selection,
|
||||||
* automatic failover, and smart cooldown for rate-limited accounts.
|
* automatic failover, and smart cooldown for rate-limited accounts.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ export class AccountManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pick the next available account (round-robin).
|
* Pick the next available account (fallback when current is unavailable).
|
||||||
* Sets activeIndex to the selected account's index.
|
* Sets activeIndex to the selected account's index.
|
||||||
* @returns {Object|null} The next available account or null if none available
|
* @returns {Object|null} The next available account or null if none available
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user