1. 05 Mar, 2026 3 commits
  2. 03 Mar, 2026 2 commits
    • shaw's avatar
      feat: apikey支持5h/1d/7d速率控制 · a80ec5d8
      shaw authored
      a80ec5d8
    • QTom's avatar
      fix(gateway): 分组隔离 — 禁止未分组账号被跨组调度 · 530a1629
      QTom authored
      当 API Key 无分组时,调度仅从未分组账号池中选取。
      修复 isAccountInGroup 在 groupID==nil 时的逻辑,
      同时补全 scheduler_snapshot_service 和 gemini_compat_service
      中的 SimpleMode 保护,确保分组隔离在所有调度路径生效。
      
      新增 ListSchedulableUngroupedByPlatform/s 方法,
      使用 Ent 的 Not(HasAccountGroups()) 谓词实现未分组账号隔离。
      新增 17 个单元和端到端隔离测试,覆盖所有分支和边界条件。
      530a1629
  3. 02 Mar, 2026 1 commit
    • QTom's avatar
      feat(gateway): 双模式用户消息队列 — 串行队列 + 软性限速 · a9285b8a
      QTom authored
      新增 UMQ (User Message Queue) 双模式支持:
      - serialize: 账号级分布式串行锁 + RPM 自适应延迟(严格限流)
      - throttle: 仅 RPM 自适应前置延迟,不阻塞并发(软性限速)
      
      后端:
      - config: 新增 Mode 字段,保留 Enabled 向后兼容
      - service: 新增 UserMessageQueueService(Lua 锁/延迟算法/清理 worker)
      - repository: 新增 UserMsgQueueCache(Redis Lua acquire/release/force-release)
      - handler: 新增 UserMsgQueueHelper(SSE ping + 等待循环 + throttle)
      - gateway: 按 mode 分支集成 serialize/throttle 逻辑
      - lint: 修复 gofmt rewrite rules、errcheck 类型断言、staticcheck QF1012
      
      前端:
      - 三态选择器 UI(关闭/软性限速/串行队列)替代 toggle 开关
      - BulkEdit 支持 null 语义(不修改)
      - i18n 中英文文案
      
      通过 6 轮专家评审(42 次 review)、golangci-lint、单元测试、集成测试。
      a9285b8a
  4. 28 Feb, 2026 8 commits
  5. 27 Feb, 2026 1 commit
    • erio's avatar
      feat: replace gemini-3-pro-image with gemini-3.1-flash-image · a6f9f9f9
      erio authored
      - Add migration 060 to update model_mapping for all antigravity accounts
      - Remove gemini-3-pro-image and gemini-3-pro-image-preview mappings
      - Add gemini-3.1-flash-image and gemini-3.1-flash-image-preview mappings
      - Update frontend usage window to show GImage for new model
      - Update isImageGenerationModel to support new model
      a6f9f9f9
  6. 26 Feb, 2026 4 commits
  7. 24 Feb, 2026 1 commit
  8. 22 Feb, 2026 2 commits
  9. 21 Feb, 2026 2 commits
  10. 19 Feb, 2026 2 commits
  11. 18 Feb, 2026 1 commit
  12. 17 Feb, 2026 1 commit
  13. 16 Feb, 2026 1 commit
  14. 14 Feb, 2026 2 commits
    • shaw's avatar
      feat: 区分 Anthropic 5m/1h 缓存创建 token 的差异化计费 · a817cafe
      shaw authored
      Anthropic API 的 cache_creation 对象区分了 ephemeral_5m 和 ephemeral_1h
      两种缓存创建 token,1h 单价远高于 5m(如 claude-3-5-haiku: 5m=$1/MTok,
      1h=$6/MTok)。此前系统统一按 5m 单价计费,导致计费偏低。
      
      后端:
      - pricing_service: 加载 LiteLLM 的 cache_creation_input_token_cost_above_1hr
      - billing_service: GetModelPricing 启用分类计费(安全守卫 1h>5m),
        CalculateCost 按 5m/1h 分别计费,无明细时回退到 5m 单价
      - gateway_service: parseSSEUsage/handleNonStreamingResponse 用 gjson
        提取嵌套 cache_creation 对象的 ephemeral_5m/1h_input_tokens
      - antigravity_gateway_service: extractSSEUsage/extractClaudeUsage 同步提取
      - usage_log: 修复 GORM column tag 确保写入正确的数据库列
      - 新增迁移 054: 删除 GORM 自动生成的重复列
      
      前端:
      - 使用记录 tooltip 展示 5m/1h 缓存创建明细(带彩色 badge 区分)
      - 表格单元格缓存写入数值旁显示 1h 标识
      a817cafe
    • yangjianbo's avatar
  15. 12 Feb, 2026 1 commit
    • yangjianbo's avatar
      chore(logging): 完成后端日志审计与结构化迁移 · 584cfc3d
      yangjianbo authored
      - 将高密度服务与处理器日志迁移到新日志系统(LegacyPrintf/结构化日志)
      - 增加 stdlog bridge 与兼容测试,保留旧日志捕获能力
      - 将 OpenAI 断流告警改为结构化 Warn 并改造对应测试为 sink 捕获
      - 补齐后端相关文件 logger 引用并通过全量 go test
      584cfc3d
  16. 11 Feb, 2026 1 commit
  17. 10 Feb, 2026 2 commits
  18. 09 Feb, 2026 4 commits
    • Edric Li's avatar
      feat: same-account retry before failover for transient errors · d6c2921f
      Edric Li authored
      For retryable transient errors (Google 400 "invalid project resource name"
      and empty stream responses), retry on the same account up to 2 times
      (with 500ms delay) before switching to another account.
      
      - Add RetryableOnSameAccount field to UpstreamFailoverError
      - Add same-account retry loop in both Gemini and Claude/OpenAI handler paths
      - Move temp-unschedule from service layer to handler layer (only after
        all same-account retries exhausted)
      - Reduce temp-unschedule cooldown from 30 minutes to 1 minute
      d6c2921f
    • yangjianbo's avatar
    • Rose Ding's avatar
      fix: 单账号分组首次 503 不设模型限流标记,避免后续请求雪崩 · 021abfca
      Rose Ding authored
      单账号 antigravity 分组收到 503 (MODEL_CAPACITY_EXHAUSTED) 时,
      原逻辑会设置 ~29s 模型限流标记。由于只有一个账号无法切换,
      后续所有新请求在预检查时命中限流 → 几毫秒内直接返回 503,
      导致约 30 秒的雪崩窗口。
      
      修复:在 Handler 入口处检查分组是否只有单个 antigravity 账号,
      如果是则提前设置 SingleAccountRetry context 标记,让 Service 层
      首次 503 就走原地重试逻辑(不设限流标记),避免污染后续请求。
      021abfca
    • 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
  19. 08 Feb, 2026 1 commit
    • erio's avatar
      feat: shuffle accounts within same sort group to prevent thundering herd · 1af06aed
      erio authored
      Add post-sort shuffle for accounts with identical (priority, loadRate,
      lastUsedAt) to break deterministic ordering when concurrent requests
      read the same scheduler snapshot. Applies to both Antigravity and
      OpenAI scheduling paths, plus the sortAccountsByPriorityAndLastUsed
      helper.
      
      Keeps upstream CallCount/ModelLoadInfo scheduling intact; shuffle is
      additive and only randomises within equivalent-rank groups.
      1af06aed