1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 15 Mar, 2026 4 commits
  7. 14 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 3 commits
  10. 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
  11. 10 Mar, 2026 1 commit
  12. 09 Mar, 2026 7 commits
  13. 07 Mar, 2026 3 commits
  14. 06 Mar, 2026 4 commits
    • shaw's avatar
      feat: /v1/messages端点适配codex账号池 · 92159994
      shaw authored
      92159994
    • Elysia's avatar
      fix issue #791 · 65a10679
      Elysia authored
      65a10679
    • alfadb's avatar
      feat(openai): add /v1/messages endpoint and API compatibility layer · ff1f1149
      alfadb authored
      Add Anthropic Messages API support for OpenAI platform groups, enabling
      clients using Claude-style /v1/messages format to access OpenAI accounts
      through automatic protocol conversion.
      
      - Add apicompat package with type definitions and bidirectional converters
        (Anthropic  Chat, Chat  Responses, Anthropic 
      
       Responses)
      - Implement /v1/messages endpoint for OpenAI gateway with streaming support
      - Add model mapping UI for OpenAI OAuth accounts (whitelist + mapping modes)
      - Support prompt caching fields and codex OAuth transforms
      - Fix tool call ID conversion for Responses API (fc_ prefix)
      - Ensure function_call_output has non-empty output field
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      ff1f1149
    • yangjianbo's avatar
      feat(openai): 增加 gpt-5.4 模型支持与定价配置 · 1a0d4ed6
      yangjianbo authored
      
      
      - 接入 gpt-5.4 模型识别与规范化,补充默认模型列表
      - 增加 gpt-5.4 输入/缓存命中/输出价格与计费兜底逻辑
      - 同步前端模型白名单与 OpenCode 上下文窗口(1050000/128000)
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      (cherry picked from commit 924476dcac6181cd0f3ee731ec7b73672ff03793)
      1a0d4ed6
  15. 05 Mar, 2026 1 commit