1. 31 Mar, 2026 2 commits
  2. 27 Mar, 2026 4 commits
    • Elysia's avatar
      修复误删的url · 81ca4f12
      Elysia authored
      81ca4f12
    • Elysia's avatar
      fix: use standard PKCE code verifier generation · 941c469a
      Elysia authored
      
      
      Replace charset→base64url double-encoding with standard random
      bytes→base64url approach to match official client behavior and avoid
      risk control detection.
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      941c469a
    • Elysia's avatar
      feat: add user:file_upload OAuth scope · 8fcd819e
      Elysia authored
      
      
      Align OAuth scopes with upstream Claude Code client which now includes
      the user:file_upload scope for file upload support.
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      8fcd819e
    • shaw's avatar
      feat(tls-fingerprint): 新增 TLS 指纹 Profile 数据库管理及代码质量优化 · 1854050d
      shaw authored
      新增功能:
      - 新增 TLS 指纹 Profile CRUD 管理(Ent schema + 迁移 + Admin API + 前端管理界面)
      - 支持账号绑定数据库中的自定义 TLS Profile,或随机选择(profile_id=-1)
      - HTTPUpstream.DoWithTLS 接口从 bool 改为 *tlsfingerprint.Profile,支持按账号指定 Profile
      - AccountUsageService 注入 TLSFingerprintProfileService,统一 usage 场景与网关的 Profile 解析逻辑
      
      代码优化:
      - 删除已被 TLSFingerprintProfileService 完全取代的 registry.go 死代码(418 行)
      - 提取 3 个 dialer 的重复 TLS 握手逻辑为 performTLSHandshake() 共用函数
      - 修复 GetTLSFingerprintProfileID 缺少 json.Number 处理的 bug
      - gateway_service.Forward 中 ResolveTLSProfile 从重试循环内重复调用改为预解析局部变量
      - 删除冗余的 buildClientHelloSpec() 单行 wrapper 和 int64(e.ID) 无效转换
      - tls_fingerprint_profile_cache.go 日志从 log.Printf 改为 slog 结构化日志
      - dialer_capture_test.go 添加 //go:build integration 标签,防止 CI 失败
      - 去重 TestProfileExpectation 类型至共享 test_types_test.go
      - 修复 9 个测试文件缺少 tlsfingerprint import 的编译错误
      - 修复 error_policy_integration_test.go 中 handleError 回调签名被错误替换的问题
      1854050d
  3. 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
  4. 24 Mar, 2026 2 commits
  5. 23 Mar, 2026 1 commit
    • Ethan0x0000's avatar
      feat(apicompat): add ResponsesAnthropic bidirectional format conversion · 68f151f5
      Ethan0x0000 authored
      Add reverse-direction converters for Anthropic platform groups to accept
      OpenAI-format requests:
      
      - ResponsesToAnthropicRequest: Responses API input → Anthropic Messages
        request with system extraction, tool/toolChoice mapping, reasoning
        effort conversion, image data URIbase64, and consecutive role merging
      - AnthropicToResponsesResponse: Anthropic response → Responses response
        with content block→output item mapping, usage, stop_reason→status
      - AnthropicEventToResponsesEvents: stateful SSE stream converter
        (Anthropic streaming protocol → Responses streaming protocol)
      - FinalizeAnthropicResponsesStream: synthetic termination for
        incomplete streams
      68f151f5
  6. 21 Mar, 2026 1 commit
  7. 20 Mar, 2026 1 commit
    • alfadb's avatar
      fix(apicompat): 修正 Anthropic→OpenAI 推理级别映射 · 8afa8c10
      alfadb authored
      旧映射错误地将所有级别上移一档(medium→high, high→xhigh),
      导致 effort=max 被原样透传到 OpenAI 上游并返回 400 错误。
      
      根据两边官方 API 定义对齐:
      - Anthropic: low, medium, high(默认), max
      - OpenAI:    low, medium, high(默认), xhigh
      
      新的 1:1 映射:low→low, medium→medium, high→high, max→xhigh
      8afa8c10
  8. 19 Mar, 2026 5 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
    • Rose Ding's avatar
    • Rose Ding's avatar
      fix: Anthropic tool schema 转 Responses API 时补充缺失的 properties 字段 · 963494ec
      Rose Ding authored
      
      
      当 Claude Code 发来的 MCP tool 的 input_schema 为 {"type":"object"} 且缺少
      properties 字段时,OpenAI Codex 后端会拒绝并报错:
      Invalid schema for function '...': object schema missing properties.
      
      新增 normalizeToolParameters 函数,在 convertAnthropicToolsToResponses 中
      对每个 tool 的 InputSchema 做规范化处理后再赋给 Parameters。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      963494ec
    • Remx's avatar
      feat(openai): 增加 gpt-5.4-mini/nano 模型支持与定价配置 · 42d73118
      Remx authored
      - 接入 gpt-5.4-mini/nano 模型识别与规范化,补充默认模型列表
      - 增加 gpt-5.4-mini/nano 输入/缓存命中/输出价格与计费兜底逻辑
      - 同步前端模型白名单与 OpenCode 配置
      - 补充 service tier(priority/flex) 计费回归测试
      42d73118
    • shaw's avatar
  9. 18 Mar, 2026 1 commit
    • QTom's avatar
      feat(admin): 分组管理列表新增用量列与账号数分类 · 961c30e7
      QTom authored
      
      
      分组管理列表增强:
      
      1. 今日/累计用量列:
         - 新增独立端点 GET /admin/groups/usage-summary
         - 一次查询返回所有分组的今日费用和累计费用(actual_cost)
         - 前端异步加载后合并显示在分组列表中
      
      2. 账号数区分可用/限流/总量:
         - 将账号数列从单一总量改为 badge 内多行展示
         - 可用: active + schedulable 的账号数(绿色)
         - 限流: rate_limit/overload/temp_unschedulable 的账号数(橙色,无限流时隐藏)
         - 总量: 全部关联账号数
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      961c30e7
  10. 17 Mar, 2026 2 commits
    • Ethan0x0000's avatar
      test(backend): add tests for upstream model tracking and model source filtering · eeff451b
      Ethan0x0000 authored
      Cover IsValidModelSource/NormalizeModelSource, resolveModelDimensionExpression SQL expressions, invalid model_source 400 responses on both GetModelStats and GetUserBreakdown, upstream_model in scan/insert SQL mock expectations, and updated passthrough/billing test signatures.
      eeff451b
    • Ethan0x0000's avatar
      feat(dashboard): add model source dimension to stats queries · 7134266a
      Ethan0x0000 authored
      Support querying model statistics by 'requested', 'upstream', or 'mapping' dimension. Add resolveModelDimensionExpression for safe SQL expression generation, IsValidModelSource whitelist validator, and NormalizeModelSource fallback. Repository persists and scans upstream_model in all insert/select paths.
      7134266a
  11. 16 Mar, 2026 3 commits
    • erio's avatar
      feat(dashboard): add per-user drill-down for group, model, and endpoint distributions · 4b41e898
      erio authored
      Click on a group name, model name, or endpoint name in the distribution
      tables to expand and show per-user usage breakdown (requests, tokens,
      actual cost, standard cost).
      
      Backend: new GET /admin/dashboard/user-breakdown API with group_id,
      model, endpoint, endpoint_type filters.
      Frontend: clickable rows with expand/collapse sub-table in all three
      distribution charts.
      4b41e898
    • QTom's avatar
      feat(backup): 备份/恢复异步化,解决 504 超时 · c1fab7f8
      QTom authored
      
      
      POST /backups 和 POST /backups/:id/restore 改为异步:立即返回 HTTP 202,
      后台 goroutine 独立执行 pg_dump → gzip → S3 上传,前端每 2s 轮询状态。
      
      后端:
      - 新增 StartBackup/StartRestore 方法,后台 goroutine 不依赖 HTTP 连接
      - Graceful shutdown 等待活跃操作完成,启动时清理孤立 running 记录
      - BackupRecord 新增 progress/restore_status 字段支持进度和恢复状态追踪
      
      前端:
      - 创建备份/恢复后轮询 GET /backups/:id 直到完成或失败
      - 标签页切换暂停/恢复轮询,组件卸载清理定时器
      - 正确处理 409(备份进行中)和轮询超时
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      c1fab7f8
    • erio's avatar
      71f72e16
  12. 15 Mar, 2026 4 commits
  13. 14 Mar, 2026 2 commits
  14. 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
  15. 12 Mar, 2026 3 commits
  16. 11 Mar, 2026 2 commits
    • shaw's avatar
      refactor: 重构 Chat Completions 端点,采用类型安全的 Responses API 转换 · 9d814679
      shaw authored
      将 /v1/chat/completions 端点从 ResponseWriter 劫持模式重构为独立的
      类型安全转换路径,与 Anthropic Messages 端点架构对齐:
      
      - 在 apicompat 包新增 Chat Completions 完整类型定义和双向转换器
      - 新增 ForwardAsChatCompletions service 方法,走 Responses API 上游
      - Handler 改为独立的账号选择/failover 循环,不再劫持 Responses handler
      - 提取 handleCompatErrorResponse 为 Chat Completions 和 Messages 共用
      - 删除旧的 forwardChatCompletions 直传路径及相关死代码
      9d814679
    • Rose Ding's avatar
      feat: add gemini 2.5 flash image support · 1c0519f1
      Rose Ding authored
      1c0519f1
  17. 10 Mar, 2026 1 commit
  18. 09 Mar, 2026 2 commits
    • QTom's avatar
      feat: 导入账号时 best-effort 从 id_token 提取用户信息 · 7a4e65ad
      QTom authored
      提取 DecodeIDToken(跳过过期校验)供导入场景使用,
      ParseIDToken 复用它并保留原有过期检查行为。
      导入 OpenAI/Sora OAuth 账号时自动补充缺失的 email、
      plan_type、chatgpt_account_id 等字段,不覆盖已有值。
      7a4e65ad
    • QTom's avatar
      feat: 从 OpenAI JWT 提取 chatgpt_plan_type 并在前端展示 · a582aa89
      QTom authored
      OAuth 授权和 token 刷新时从 id_token 的 OpenAI auth claim 中
      提取 chatgpt_plan_type(plus/team/pro/free),存入 credentials,
      账号管理页面 PlatformTypeBadge 显示订阅类型。
      a582aa89