1. 08 Feb, 2026 12 commits
    • erio's avatar
      fix: parse Gemini native request format in ParseGatewayRequest for correct session hash generation · 35598d56
      erio authored
      ParseGatewayRequest only parsed Anthropic format (system/messages),
      ignoring Gemini native format (systemInstruction/contents). This caused
      GenerateSessionHash to produce identical hashes for all Gemini sessions.
      
      Add protocol parameter to ParseGatewayRequest to branch between
      Anthropic and Gemini parsing. Update GenerateSessionHash message
      traversal to extract text from both formats.
      35598d56
    • erio's avatar
      fix: prevent sessionHash collision for different users with same messages · 5c76b9e4
      erio authored
      Mix SessionContext (ClientIP, UserAgent, APIKeyID) into
      GenerateSessionHash 3rd-level fallback to differentiate requests
      from different users sending identical content.
      
      Also switch hashContent from SHA256-truncated to XXHash64 for
      better performance, and optimize Trie Lua script to match from
      longest prefix first.
      5c76b9e4
    • erio's avatar
      fix: clean thoughtSignature for all clients, not just CLI · 0b8fea4c
      erio authored
      Previously, thoughtSignature cleanup only applied to Gemini CLI
      requests (detected via x-gemini-api-privileged-user-id header or
      tmp dir pattern). This caused 400 errors for non-CLI clients when
      session cache expired and they sent stale signatures.
      
      Remove the isGeminiCLIRequest guard so all clients benefit from
      proactive thoughtSignature cleanup on session binding miss.
      0b8fea4c
    • bayma888's avatar
      feat(admin): add drag-and-drop group sort order · bac9e2bf
      bayma888 authored
      - Add `sort_order` field to groups table with migration
      - Add `PUT /api/v1/admin/groups/sort-order` API for batch update
      - Implement drag-and-drop UI using vue-draggable-plus
      - All queries now order groups by sort_order
      - Add i18n support (en/zh) for sort-related UI text
      - Update test stubs to satisfy new interface methods
      bac9e2bf
    • shaw's avatar
      feat(ui): 用户列表页显示当前并发数 · e4d74ae1
      shaw authored
      优化 /admin/users 页面的并发数列,显示「当前/最大」格式,
      参考 AccountCapacityCell 的设计风格。
      
      - 后端 UserHandler 注入 ConcurrencyService,批量查询用户当前并发数
      - 新增 UserConcurrencyCell 组件,支持颜色状态(空闲灰/使用中黄/满载红)
      - 前端 AdminUser 类型添加 current_concurrency 字段
      e4d74ae1
    • erio's avatar
    • shaw's avatar
      fix: apikey类型账号test去掉oauth-2025-04-20 · b4ec6578
      shaw authored
      b4ec6578
    • erio's avatar
      chore: bump version to 0.1.74.7 · 3c936441
      erio authored
      3c936441
    • erio's avatar
      refactor(upstream): replace upstream account type with apikey, auto-append /antigravity · fb58560d
      erio authored
      Upstream accounts now use the standard APIKey type instead of a dedicated
      upstream type. GetBaseURL() and new GetGeminiBaseURL() automatically append
      /antigravity for Antigravity platform APIKey accounts, eliminating the need
      for separate upstream forwarding methods.
      
      - Remove ForwardUpstream, ForwardUpstreamGemini, testUpstreamConnection
      - Remove upstream branch guards in Forward/ForwardGemini/TestConnection
      - Add migration 052 to convert existing upstream accounts to apikey
      - Update frontend CreateAccountModal to create apikey type
      - Add unit tests for GetBaseURL and GetGeminiBaseURL
      fb58560d
    • erio's avatar
      fix(upstream): passthrough response body directly instead of parsing SSE · 6ab77f5e
      erio authored
      ForwardUpstream/ForwardUpstreamGemini should pipe the upstream response
      directly to the client (headers + body), not parse it as SSE stream.
      6ab77f5e
    • erio's avatar
    • erio's avatar
      feat(upstream): passthrough all client headers instead of manual header setting · 1563bd3d
      erio authored
      Replace manual header setting (Content-Type, anthropic-version, anthropic-beta)
      with full client header passthrough in ForwardUpstream/ForwardUpstreamGemini.
      Only authentication headers (Authorization, x-api-key) are overridden with
      upstream account credentials. Hop-by-hop headers are excluded.
      
      Add unit tests covering header passthrough, auth override, and hop-by-hop filtering.
      1563bd3d
  2. 07 Feb, 2026 22 commits
  3. 06 Feb, 2026 6 commits
    • shaw's avatar
      fix(ops): 添加 token 相关字段白名单避免误脱敏 · 9f4c1ef9
      shaw authored
      在敏感字段检测中添加白名单,排除 API 参数和用量统计字段:
      - max_tokens, max_completion_tokens, max_output_tokens
      - completion_tokens, prompt_tokens, total_tokens
      - input_tokens, output_tokens
      - cache_creation_input_tokens, cache_read_input_tokens
      
      这些字段名虽然包含 "token" 但只是数值参数,不应被脱敏处理。
      9f4c1ef9
    • shaw's avatar
      fix(gateway): 移除 PR #316 引入的工具名转换逻辑 · d182ef03
      shaw authored
      移除响应阶段的工具名/schema/description 转换逻辑,修复第三方工具调用时
      工具名被错误转换的问题(如 Task → task)。
      
      移除内容:
      - 工具名相关正则变量(toolPrefixRe, toolNameBoundaryRe 等)
      - openCodeToolOverrides 和 claudeToolNameOverrides 映射表
      - 工具名转换函数(normalizeToolNameForClaude, normalizeToolNameForOpenCode 等)
      - 响应体工具名替换函数(replaceToolNamesInText, replaceToolNamesInResponseBody 等)
      - 参数名转换函数(normalizeParamNameForOpenCode, rewriteParamKeysInValue)
      - 工具描述清理函数(sanitizeToolDescription)
      - 输入 schema 转换函数(normalizeToolInputSchema)
      - 模型 ID 正则替换函数(replaceModelIDInText)
      
      保留内容:
      - 系统提示词清理(sanitizeSystemText)
      - Claude Code 指纹 headers 处理
      - 模型 ID 映射(通过 JSON 对象操作)
      d182ef03
    • yangjianbo's avatar
      ee01f80d
    • yangjianbo's avatar
      fix(兼容): 将 Kimi cached_tokens 映射到 Claude 标准 cache_read_input_tokens · f33a9501
      yangjianbo authored
      
      
      Kimi 等 Claude 兼容 API 返回缓存信息使用 OpenAI 风格的 cached_tokens 字段,
      而非 Claude 标准的 cache_read_input_tokens,导致客户端收不到缓存命中信息且
      内部计费缓存折扣为 0。
      
      新增 reconcileCachedTokens 辅助函数,在 cache_read_input_tokens == 0 且
      cached_tokens > 0 时自动填充,覆盖流式(message_start/message_delta)和
      非流式两种响应路径。对 Claude 原生上游无影响。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      f33a9501
    • shaw's avatar
      chore: 前端增加opus4.6模型映射 · 01b08e1e
      shaw authored
      01b08e1e
    • yangjianbo's avatar
      fix(兼容): 将 Kimi cached_tokens 映射到 Claude 标准 cache_read_input_tokens · c6a456c7
      yangjianbo authored
      
      
      Kimi 等 Claude 兼容 API 返回缓存信息使用 OpenAI 风格的 cached_tokens 字段,
      而非 Claude 标准的 cache_read_input_tokens,导致客户端收不到缓存命中信息且
      内部计费缓存折扣为 0。
      
      新增 reconcileCachedTokens 辅助函数,在 cache_read_input_tokens == 0 且
      cached_tokens > 0 时自动填充,覆盖流式(message_start/message_delta)和
      非流式两种响应路径。对 Claude 原生上游无影响。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      c6a456c7