1. 20 Mar, 2026 1 commit
  2. 17 Mar, 2026 1 commit
    • Ethan0x0000's avatar
      feat(service): record upstream model across all gateway paths · 2e4ac88a
      Ethan0x0000 authored
      Propagate UpstreamModel through ForwardResult and OpenAIForwardResult in Anthropic direct, API-key passthrough, Bedrock, and OpenAI gateway flows. Extract optionalNonEqualStringPtr and optionalTrimmedStringPtr into usage_log_helpers.go. Store upstream_model only when it differs from the requested model.
      
      Also introduces anthropicPassthroughForwardInput struct to reduce parameter count.
      2e4ac88a
  3. 16 Mar, 2026 1 commit
    • QTom's avatar
      fix(gateway): 防止 OpenAI Codex 跨用户串流 · ab4e8b2c
      QTom authored
      根因:多个用户共享同一 OAuth 账号时,conversation_id/session_id 头
      未做用户隔离,导致上游 chatgpt.com 将不同用户的请求关联到同一会话。
      
      HTTP SSE 修复:
      - 新增 isolateOpenAISessionID(apiKeyID, raw),将 API Key ID 混入
        session 标识符(xxhash),确保不同 Key 的用户产生不同上游会话
      - buildUpstreamRequest: OAuth 分支先 Del 客户端透传的 session 头,
        再用隔离值覆盖
      - buildUpstreamRequestOpenAIPassthrough: 透传路径同样隔离
      - ForwardAsAnthropic: Anthropic Messages 兼容路径同步修复
      - buildOpenAIWSHeaders: WS 路径的 OAuth session 头同步隔离
      ab4e8b2c
  4. 15 Mar, 2026 2 commits
    • erio's avatar
      feat(ops): add ignore insufficient balance errors toggle and extract error constants · cfe72159
      erio authored
      - Add 5th error filter switch IgnoreInsufficientBalanceErrors to suppress
        upstream insufficient balance / insufficient_quota errors from ops log
      - Extract hardcoded error strings into package-level constants for
        shouldSkipOpsErrorLog, normalizeOpsErrorType, classifyOpsPhase, and
        classifyOpsIsBusinessLimited
      - Define ErrNoAvailableAccounts sentinel error and replace all
        errors.New("no available accounts") call sites
      - Update tests to use require.ErrorIs with the sentinel error
      cfe72159
    • Ethan0x0000's avatar
      feat: 完善使用记录端点可观测性与分布统计 · eefab159
      Ethan0x0000 authored
      将入站、上游与路径三类端点分布统一到使用记录页的一致化卡片交互中,并补齐端点元数据与统计链路,提升排障与流量分析效率。
      eefab159
  5. 14 Mar, 2026 1 commit
  6. 12 Mar, 2026 1 commit
  7. 11 Mar, 2026 6 commits
  8. 09 Mar, 2026 3 commits
  9. 08 Mar, 2026 1 commit
  10. 07 Mar, 2026 5 commits
  11. 06 Mar, 2026 5 commits
  12. 05 Mar, 2026 4 commits
    • erio's avatar
    • erio's avatar
      refactor: unify post-usage billing logic and fix account quota calculation · 02dea7b0
      erio authored
      - Extract postUsageBilling() to consolidate billing logic across
        GatewayService.RecordUsage, RecordUsageWithLongContext, and
        OpenAIGatewayService.RecordUsage, eliminating ~120 lines of
        duplicated code
      - Fix account quota to use TotalCost × accountRateMultiplier
        (was using raw TotalCost, inconsistent with account cost stats)
      - Fix RecordUsageWithLongContext API Key quota only updating in
        balance mode (now updates regardless of billing type)
      - Fix WebSocket client disconnect detection on Windows by adding
        "an established connection was aborted" to known disconnect errors
      02dea7b0
    • erio's avatar
      feat: add quota limit for API key accounts · 05527b13
      erio authored
      - Add configurable spending limit (quota_limit) for apikey-type accounts
      - Atomic quota accumulation via PostgreSQL JSONB operations on TotalCost
      - Scheduler filters out over-quota accounts with outbox-triggered snapshot refresh
      - Display quota usage ($used / $limit) in account capacity column
      - Add "Reset Quota" action in account menu to reset usage to zero
      - Editing account settings preserves quota_used (no accidental reset)
      - Covers all 3 billing paths: Anthropic, Gemini, OpenAI RecordUsage
      
      chore: bump version to 0.1.90.4
      05527b13
    • yangjianbo's avatar
      feat(openai-ws): 合并 WS v2 透传模式与前端 ws mode · 1d0872e7
      yangjianbo authored
      
      
      新增 OpenAI WebSocket v2 passthrough relay 数据面与服务适配层,
      支持按账号 ws mode 在 ctx_pool 与 passthrough 间路由。
      
      同步调整前端 OpenAI ws mode 选项为 off/ctx_pool/passthrough,
      并补充 i18n 文案与对应单测。
      
      新增 Caddyfile.dmit 与 docker-compose-aicodex.yml 部署配置,
      用于宿主机场景下的反向代理与服务编排。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      1d0872e7
  13. 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
  14. 28 Feb, 2026 1 commit
  15. 22 Feb, 2026 1 commit
    • yangjianbo's avatar
      fix(codex): 修复额度窗口过期展示并补齐高覆盖测试 · 10636d8a
      yangjianbo authored
      - 后端新增绝对重置时间字段计算(codex_5h_reset_at/codex_7d_reset_at)
      
      - 前端统一窗口解析逻辑:绝对时间优先,updated_at+seconds 回退,过期自动归零
      
      - 新增后端与前端单元测试,覆盖关键边界与异常场景
      10636d8a
  16. 14 Feb, 2026 4 commits
  17. 13 Feb, 2026 1 commit
    • yangjianbo's avatar
      fix(ops): 修复日志级别过滤并增强OpenAI错误诊断日志 · f96acf6e
      yangjianbo authored
      - 移除 warn 级别下 access info 的强制入库补写,确保运行时日志级别真实生效
      
      - 将 OpenAI fallback matched 与 passthrough 断流提示按需求降级为 info
      
      - 为 codex_cli_only 与 instructions required 场景补充请求诊断字段(含 User-Agent)
      
      - 出于安全考虑移除请求体预览,仅保留 request_body_size 与白名单头信息
      
      - 新增/更新回归测试,覆盖 Forward 入口到日志落库链路
      f96acf6e