From 21f923b4ec13fa99fdbaee05745e4e81c4ba5924 Mon Sep 17 00:00:00 2001 From: Badri Narayanan S Date: Thu, 25 Dec 2025 13:37:20 +0530 Subject: [PATCH] docs: replace round-robin references with sticky selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- CLAUDE.md | 2 +- README.md | 2 +- src/account-manager.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 59921c8..3ebc857 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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/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/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/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 diff --git a/README.md b/README.md index dfc1119..c31e925 100644 --- a/README.md +++ b/README.md @@ -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)** -Add one or more Google accounts for round-robin load balancing: +Add one or more Google accounts for load balancing: ```bash npm run accounts:add diff --git a/src/account-manager.js b/src/account-manager.js index faca45f..e2758b2 100644 --- a/src/account-manager.js +++ b/src/account-manager.js @@ -1,6 +1,6 @@ /** * 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. */ @@ -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. * @returns {Object|null} The next available account or null if none available */