1. 05 Apr, 2026 2 commits
  2. 04 Apr, 2026 3 commits
    • erio's avatar
      fix: resolve golangci-lint issues — remove unused constants and functions, fix gofmt · 1b5ae71d
      erio authored
      - Remove unused claudeMax*Tokens constants (Claude Max feature not included)
      - Remove unused UsageMapHook type, SetUsageMapHook method, and usageToMap function
      - Fix gofmt formatting in channel_service.go, openai_model_mapping_test.go,
        chatcompletions_to_responses.go
      1b5ae71d
    • erio's avatar
      fix: resolve cherry-pick compilation and test issues · e59fa863
      erio authored
      - Add int64(0) param to SelectAccountWithLoadAwareness callers (signature change from channel scheduling refactor)
      - Add UsageMapHook type and struct field to StreamingProcessor
      - Revert Claude Max cache billing code to upstream/main (not part of channel feature)
      - Revert credits overages logic to upstream/main (non-channel change)
      - Remove Instructions field reference (non-channel OpenAI feature)
      - Restore sora_client_handler_test.go from upstream + add channel service nil params
      e59fa863
    • erio's avatar
      feat: image output token billing, channel-mapped billing source, credits balance precheck · d72ac926
      erio authored
      - Parse candidatesTokensDetails from Gemini API to separate image/text output tokens
      - Add image_output_tokens and image_output_cost to usage_log (migration 089)
      - Support per-image-token pricing via output_cost_per_image_token from model pricing data
      - Channel pricing ImageOutputPrice override works in token billing mode
      - Auto-fill image_output_price in channel pricing form from model defaults
      - Add "channel_mapped" billing model source as new default (migration 088)
      - Bills by model name after channel mapping, before account mapping
      - Fix channel cache error TTL sign error (115s → 5s)
      - Fix Update channel only invalidating new groups, not removed groups
      - Fix frontend model_mapping clearing sending undefined instead of {}
      - Credits balance precheck via shared AccountUsageService cache before injection
      - Skip credits injection for accounts with insufficient balance
      - Don't mark credits exhausted for "exhausted your capacity on this model" 429s
      d72ac926
  3. 31 Mar, 2026 2 commits
  4. 25 Mar, 2026 3 commits
    • QTom's avatar
      fix: 修复 golangci-lint 报告的 5 个问题 · 975e6b15
      QTom authored
      - gofmt: 修复 admin_service/antigravity_oauth_service/token_refresh_service 格式
      - staticcheck S1009: 移除 SetUserSettingsResponse.IsSuccess 中冗余的 nil 检查
      - unused: 将仅测试使用的 applyAntigravitySubscriptionResult 移至测试文件
      
      Made-with: Cursor
      975e6b15
    • QTom's avatar
      feat(antigravity): 从 LoadCodeAssist 复用 TierInfo 提取 plan_type · f6fd7c83
      QTom authored
      复用已有 GetTier() 返回的 tier ID(free-tier / g1-pro-tier /
      g1-ultra-tier),通过 TierIDToPlanType 映射为 Free / Pro / Ultra,
      在 loadProjectIDWithRetry 中顺带提取并写入 credentials.plan_type;
      前端增加 Abnormal 异常套餐红色标记。
      
      Made-with: Cursor
      f6fd7c83
    • QTom's avatar
      feat(antigravity): 自动设置隐私并支持后台手动重试 · c2965c0f
      QTom authored
      新增 Antigravity OAuth 隐私设置能力,在账号创建、刷新、导入和后台
      Token 刷新路径自动调用 setUserSettings + fetchUserInfo 关闭遥测;
      持久化后同步内存 Extra,错误处理改为日志记录。
      
      Made-with: Cursor
      c2965c0f
  5. 19 Mar, 2026 2 commits
    • erio's avatar
      fix(antigravity): fast-fail on proxy unavailable, temp-unschedule account · 528ff5d2
      erio authored
      ## Problem
      
      When a proxy is unreachable, token refresh retries up to 4 times with
      30s timeout each, causing requests to hang for ~2 minutes before
      failing with a generic 502 error. The failed account is not marked,
      so subsequent requests keep hitting it.
      
      ## Changes
      
      ### Proxy connection fast-fail
      - Set TCP dial timeout to 5s and TLS handshake timeout to 5s on
        antigravity client, so proxy connectivity issues fail within 5s
        instead of 30s
      - Reduce overall HTTP client timeout from 30s to 10s
      - Export `IsConnectionError` for service-layer use
      - Detect proxy connection errors in `RefreshToken` and return
        immediately with "proxy unavailable" error (no retries)
      
      ### Token refresh temp-unschedulable
      - Add 8s context timeout for token refresh on request path
      - Mark account as temp-unschedulable for 10min when refresh fails
        (both background `TokenRefreshService` and request-path
        `GetAccessToken`)
      - Sync temp-unschedulable state to Redis cache for immediate
        scheduler effect
      - Inject `TempUnschedCache` into `AntigravityTokenProvider`
      
      ### Account failover
      - Return `UpstreamFailoverError` on `GetAccessToken` failure in
        `Forward`/`ForwardGemini` to trigger handler-level account switch
        instead of returning 502 directly
      
      ### Proxy probe alignment
      - Apply same 5s dial/TLS timeout to shared `httpclient` pool
      - Reduce proxy probe timeout from 30s to 10s
      528ff5d2
    • shaw's avatar
  6. 16 Mar, 2026 1 commit
  7. 15 Mar, 2026 2 commits
  8. 13 Mar, 2026 1 commit
    • erio's avatar
      feat(antigravity): add 403 forbidden status detection, classification and display · 6344fa2a
      erio authored
      Backend:
      - Detect and classify 403 responses into three types:
        validation (account needs Google verification),
        violation (terms of service / banned),
        forbidden (generic 403)
      - Extract verification/appeal URLs from 403 response body
        (structured JSON parsing with regex fallback)
      - Add needs_verify, is_banned, needs_reauth, error_code fields
        to UsageInfo (omitempty for zero impact on other platforms)
      - Handle 403 in request path: classify and permanently set account error
      - Save validation_url in error_message for degraded path recovery
      - Enrich usage with account error on both success and degraded paths
      - Add singleflight dedup for usage requests with independent context
      - Differentiate cache TTL: success/403 → 3min, errors → 1min
      - Return degraded UsageInfo instead of HTTP 500 on quota fetch errors
      
      Frontend:
      - Display forbidden status badges with color coding (red for banned,
        amber for needs verification, gray for generic)
      - Show clickable verification/appeal URL links
      - Display needs_reauth and degraded error states in usage cell
      - Add Antigravity tier label badge next to platform type
      
      Tests:
      - Comprehensive unit tests for classifyForbiddenType (7 cases)
      - Unit tests for extractValidationURL (8 cases including unicode escapes)
      - Integration test for FetchQuota forbidden path
      6344fa2a
  9. 12 Mar, 2026 1 commit
    • kunish's avatar
      fix: remove SSE termination marker from DefaultStopSequences · cdb64b0d
      kunish authored
      The SSE stream termination marker string was incorrectly included in
      DefaultStopSequences, causing Gemini to prematurely stop generating
      output whenever the model produced text containing that marker.
      
      The SSE-level protocol filtering in stream_transformer.go already
      handles this marker correctly; it should not be a stop sequence for
      the model's text generation.
      cdb64b0d
  10. 11 Mar, 2026 1 commit
  11. 09 Mar, 2026 2 commits
  12. 06 Mar, 2026 1 commit
  13. 03 Mar, 2026 1 commit
    • shaw's avatar
      fix: 恢复 PR #682 中被误替换为占位符的 OAuth client_secret · 0fe09f1d
      shaw authored
      PR #682 (release → main 全量同步) 将 Antigravity 和 Gemini CLI 的
      OAuth client_secret 硬编码值替换为了 "GOCSPX-your-client-secret" 占位符,
      导致未配置环境变量的部署环境中 token 刷新失败。
      
      恢复内容:
      - antigravity/oauth.go: 恢复真实 client_secret
      - antigravity/oauth_test.go: 恢复测试断言中的真实值
      - geminicli/constants.go: 恢复真实 client_secret
      0fe09f1d
  14. 02 Mar, 2026 1 commit
    • QTom's avatar
      feat(proxy): 集中代理 URL 验证并实现全局 fail-fast · fdcbf7aa
      QTom authored
      提取 proxyurl.Parse() 公共包,将分散在 6 处的代理 URL 验证逻辑
      统一收敛,确保无效代理配置在创建时立即失败,永不静默回退直连。
      
      主要变更:
      - 新增 proxyurl 包:统一 TrimSpace → url.Parse → Host 校验 → Scheme 白名单
      - socks5:// 自动升级为 socks5h://,防止 DNS 泄漏(大小写不敏感)
      - antigravity: http.ProxyURL → proxyutil.ConfigureTransportProxy 支持 SOCKS5
      - openai_oauth: 删除 newOpenAIOAuthHTTPClient,收编至 httpclient.GetClient
      - 移除未使用的 ProxyStrict 字段(fail-fast 已是全局默认行为)
      - 补充 15 个 proxyurl 测试 + pricing/usage fail-fast 测试
      fdcbf7aa
  15. 28 Feb, 2026 1 commit
  16. 27 Feb, 2026 1 commit
  17. 26 Feb, 2026 1 commit
  18. 25 Feb, 2026 2 commits
  19. 24 Feb, 2026 7 commits
  20. 23 Feb, 2026 1 commit
  21. 11 Feb, 2026 4 commits
    • sususu98's avatar
      fix: include Gemini thoughtsTokenCount in output token billing · d21d70a5
      sususu98 authored
      Gemini 2.5 Pro/Flash thinking models return thoughtsTokenCount separately
      from candidatesTokenCount in usageMetadata, but this field was not parsed
      or included in billing calculations, causing thinking tokens to be
      unbilled.
      
      - Add ThoughtsTokenCount field to GeminiUsageMetadata struct
      - Include thoughtsTokenCount in OutputTokens across all 3 Gemini usage
        parsing paths (non-streaming, streaming, compat layer)
      - Add tests covering thinking token scenarios
      
      Closes #554
      d21d70a5
    • Edric Li's avatar
      feat(antigravity): 添加 onboardUser 支持并修复 project_id 补齐逻辑 · a4a46a86
      Edric Li authored
      - 新增 OnboardUser API 客户端方法,支持账号 onboarding 获取 project_id
      - loadProjectIDWithRetry 增加 onboard 回退:LoadCodeAssist 未返回 project_id 时自动触发 onboarding
      - GetAccessToken 中 project_id 补齐改用轻量 FillProjectID 替代全量 RefreshAccountToken
      - 补齐逻辑增加 5 分钟冷却机制,防止频繁重试
      - OnboardUser 轮询等待改为 context 感知,支持提前取消
      - 提取 mergeCredentials 辅助方法消除重复代码
      - 新增 extractProjectIDFromOnboardResponse 和 resolveDefaultTierID 单元测试
      a4a46a86
    • SilentFlower's avatar
      [UPDATE] 优化思考预算逻辑与代码结构 · 6ae82e04
      SilentFlower authored
      🧠 refactor(antigravity): 完善 thinking 预算分配策略并重构工具构建逻辑
      6ae82e04
    • SilentFlower's avatar
      [UPDATE] 增强 Claude Thinking 模式支持与 Opus 4.6 动态预算适配 · 19cca11e
      SilentFlower authored
       feat(antigravity): 支持 thinking adaptive 类型并适配 Opus 4.6 动态预算
      🧪 test(gateway): 增加 thinking 模式解析与签名块过滤的边界用例测试
      19cca11e