1. 16 Mar, 2026 1 commit
    • erio's avatar
      refactor(antigravity): unify TestConnection with dispatch retry loop · a6f99cf5
      erio authored
      TestConnection now reuses antigravityRetryLoop instead of a standalone
      HTTP loop, gaining credits overages, smart retry, and 429/503 backoff
      for free. AccountSwitchError is caught and surfaced as a friendly
      message. Also populates RateLimitedModel in TempUnscheduled switch error.
      
      Test fixes:
      - Use RATE_LIMIT_EXCEEDED in 503 short-delay test to avoid 60x1s timeout
      - Clamp waitDuration=0 instead of 999s to avoid 15s max-wait timeout
      - Enhance mockSmartRetryUpstream with repeatLast and body caching
      a6f99cf5
  2. 15 Mar, 2026 1 commit
  3. 09 Feb, 2026 2 commits
    • Edric Li's avatar
      feat: MODEL_CAPACITY_EXHAUSTED 使用固定1s间隔重试60次,不切换账号 · 6114f69c
      Edric Li authored
      MODEL_CAPACITY_EXHAUSTED (503) 表示模型容量不足,所有账号共享同一容量池,
      切换账号无意义。改为固定1s间隔重试最多60次,重试耗尽后直接返回上游错误。
      
      - 新增 antigravityModelCapacityRetryMaxAttempts=60 和 antigravityModelCapacityRetryWait=1s
      - shouldTriggerAntigravitySmartRetry 新增 isModelCapacityExhausted 返回值
      - handleSmartRetry 对 MODEL_CAPACITY_EXHAUSTED 使用独立重试策略
      - handleModelRateLimit 对 MODEL_CAPACITY_EXHAUSTED 仅标记 Handled,不设限流
      - 重试耗尽后不设置模型限流、不清除粘性会话、不切换账号
      6114f69c
    • erio's avatar
      refactor: replace scope-level rate limiting with model-level rate limiting · fc095bf0
      erio authored
      Merge functional changes from develop branch:
      - Remove AntigravityQuotaScope system (claude/gemini_text/gemini_image)
      - Replace with per-model rate limiting using resolveAntigravityModelKey
      - Remove model load statistics (IncrModelCallCount/GetModelLoadBatch)
      - Simplify account selection to unified priority→load→LRU algorithm
      - Remove SetAntigravityQuotaScopeLimit from AccountRepository
      - Clean up scope-related UI indicators and API fields
      fc095bf0
  4. 07 Feb, 2026 4 commits
    • erio's avatar
      feat: smart retry max 1 attempt + clear sticky session on failure · 3077fd27
      erio authored
      - Change antigravitySmartRetryMaxAttempts from 3 to 1 to prevent
        repeated rate limiting and long waits
      - Clear sticky session binding (DeleteSessionAccountID) after smart
        retry exhaustion, so subsequent requests don't hit the same
        rate-limited account
      - Add flow diagrams to Forward/ForwardGemini doc comments
      - Add comprehensive unit tests covering:
        - Sticky session cleared on retry failure (429, 503, network error)
        - Sticky session NOT cleared on retry success
        - Sticky session NOT cleared for non-sticky requests (empty hash)
        - Sticky session NOT cleared on long delay path (handled by handler)
        - Nil cache safety (no panic)
        - MaxAttempts constant verification
        - End-to-end retryLoop → switchError propagation with session clear
      3077fd27
    • erio's avatar
    • erio's avatar
      fix(antigravity): support upstream accounts and custom model_mapping in scheduling · de092728
      erio authored
      - GetAccessToken: add upstream branch to read api_key from credentials
      - shouldTriggerAntigravitySmartRetry: relax check from IsOAuth to Platform-based
      - isModelSupportedByAccount/WithContext: replace IsAntigravityModelSupported
        whitelist with mapAntigravityModel for unified scheduling/forwarding logic
      - mapAntigravityModel: fix edge case where wildcard target equals request model
      - Update tests for new behavior and add custom model_mapping test cases
      de092728
    • erio's avatar
      feat(antigravity): comprehensive enhancements - model mapping, rate limiting, scheduling & ops · 5e98445b
      erio authored
      Key changes:
      - Upgrade model mapping: Opus 4.5 → Opus 4.6-thinking with precise matching
      - Unified rate limiting: scope-level → model-level with Redis snapshot sync
      - Load-balanced scheduling by call count with smart retry mechanism
      - Force cache billing support
      - Model identity injection in prompts with leak prevention
      - Thinking mode auto-handling (max_tokens/budget_tokens fix)
      - Frontend: whitelist mode toggle, model mapping validation, status indicators
      - Gemini session fallback with Redis Trie O(L) matching
      - Ops: enhanced concurrency monitoring, account availability, retry logic
      - Migration scripts: 049-051 for model mapping unification
      5e98445b