1. 10 Apr, 2026 1 commit
  2. 08 Apr, 2026 1 commit
  3. 06 Apr, 2026 1 commit
  4. 05 Apr, 2026 5 commits
  5. 04 Apr, 2026 20 commits
    • 陈曦's avatar
      深色模式样式修正 · daa2e6df
      陈曦 authored
      daa2e6df
    • erio's avatar
      fix: resolve 5 audit findings in channel/credits/scheduling · 71f61bbc
      erio authored
      P0-1: Credits degraded response retry + fail-open
      - Add isAntigravityDegradedResponse() to detect transient API failures
      - Retry up to 3 times with exponential backoff (500ms/1s/2s)
      - Invalidate singleflight cache between retries
      - Fail-open after exhausting retries instead of 5h circuit break
      
      P1-1: Fix channel restriction pre-check timing conflict
      - Swap checkClaudeCodeRestriction before checkChannelPricingRestriction
      - Ensures channel restriction is checked against final fallback groupID
      
      P1-2: Add interval pricing validation (frontend + backend)
      - Backend: ValidateIntervals() with boundary, price, overlap checks
      - Frontend: validateIntervals() with Chinese error messages
      - Rules: MinTokens>=0, MaxTokens>MinTokens, prices>=0, no overlap
      
      P2: Fix cross-platform same-model pricing/mapping override
      - Store cache keys using original platform instead of group platform
      - Lookup across matching platforms (antigravity→anthropic→gemini)
      - Prevents anthropic/gemini same-name models from overwriting each other
      71f61bbc
    • erio's avatar
    • erio's avatar
      fix(ui): show token breakdown when image model uses token billing · 212eaa3a
      erio authored
      Only display image count format when billing_mode is "image".
      When channel has token pricing, show input/output/cache token details.
      212eaa3a
    • erio's avatar
      1b2ea7a1
    • erio's avatar
      a9e5fc85
    • erio's avatar
      fix: address audit findings - cache sync, validation, consistency · 9b213115
      erio authored
      - clearCreditsExhausted: sync Redis scheduler cache after DB update
      - Image billing mode UI: write to per_request_price instead of image_output_price
      - OpenAI RecordUsage: use BillingModelSourceRequested constant, add s.cfg nil guard
      - Fix i18n key path: admin.channels.perRequestPriceRequired → admin.channels.form.perRequestPriceRequired
      9b213115
    • erio's avatar
      fix: validate empty intervals + antigravity platform pricing match · 2355029d
      erio authored
      - Backend: reject intervals with all-null price fields on save
      - Backend: filterValidIntervals skips empty intervals in pricing resolver
      - Frontend: red border + asterisk on empty interval rows
      - Backend: antigravity groups now match anthropic/gemini channel pricing
      2355029d
    • erio's avatar
      feat(ui): display three-level model mapping chain in usage logs · c0b5900a
      erio authored
      - Show channel + account mapping steps using model_mapping_chain field
      - Add model_mapping_chain to AdminUsageLog TypeScript type
      - Fallback to two-level display when chain is not available
      - Fix cost nil guard in Anthropic/Antigravity RecordUsage paths
      - Bump version to 0.1.105.31
      c0b5900a
    • 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
    • erio's avatar
      feat(channel): 渠道管理全链路集成 — 模型映射、定价、限制、用量统计 · 2555951b
      erio authored
      - 渠道模型映射:支持精确匹配和通配符映射,按平台隔离
      - 渠道模型定价:支持 token/按次/图片三种计费模式,区间分层定价
      - 模型限制:渠道可限制仅允许定价列表中的模型
      - 计费模型来源:支持 requested/upstream 两种计费模型选择
      - 用量统计:usage_logs 新增 channel_id/model_mapping_chain/billing_tier/billing_mode 字段
      - Dashboard 支持 model_source 维度(requested/upstream/mapping)查看模型统计
      - 全部 gateway handler 统一接入 ResolveChannelMappingAndRestrict
      - 修复测试:同步 SoraGenerationRepository 接口、SQL INSERT 参数、scan 字段
      2555951b
    • erio's avatar
    • erio's avatar
      feat(ui): 渠道表单模型标签和映射输入框显示平台对应颜色 · 40cebc25
      erio authored
      - PricingEntryCard 折叠态模型 tag 按平台着色
      - ModelTagInput 模型标签按平台着色
      - 模型映射输入框边框按平台着色
      40cebc25
    • erio's avatar
      fix(ui): 渠道定价折叠态模型名完整展示,不再截断 · 58f20446
      erio authored
      去掉 max-w-[120px] truncate 限制,改用 flex-wrap 允许换行,
      充分利用空白区域展示完整模型名。
      58f20446
    • erio's avatar
      feat(usage): 使用记录增加计费模式字段 — 记录/展示/筛选 token/按次/图片 · a51e0047
      erio authored
      - DB: usage_logs 表新增 billing_mode VARCHAR(20) 列
      - 后端: RecordUsage 写入时根据 image_count 判定计费模式
      - 前端: 使用记录表格新增计费模式 badge 列 + 筛选下拉
      a51e0047
    • erio's avatar
      feat(channel): 模型价格自动填充 + 默认定价 API · 12d03e40
      erio authored
      - 新增 GET /admin/channels/model-pricing?model=xxx API
      - 从 BillingService 查询 LiteLLM/Fallback 默认定价
      - 前端添加模型时自动查询并填充价格($/MTok)
      - 仅在所有价格字段为空时才自动填充,不覆盖手动配置
      12d03e40
    • erio's avatar
      feat(channel): 缓存扁平化 + 网关映射集成 + 计费模式统一 + 模型限制 · ebac0dc6
      erio authored
      - 缓存重构为 O(1) 哈希结构 (pricingByGroupModel, mappingByGroupModel)
      - 渠道模型映射接入网关流程 (Forward 前应用, a→b→c 映射链)
      - 新增 billing_model_source 配置 (请求模型/最终模型计费)
      - usage_logs 新增 channel_id, model_mapping_chain, billing_tier 字段
      - 每种计费模式统一支持默认价格 + 区间定价
      - 渠道模型限制开关 (restrict_models)
      - 分组按平台分类展示 + 彩色图标
      - 必填字段红色星号 + 模型映射 UI
      - 去除模型通配符支持
      ebac0dc6
    • erio's avatar
      feat(channel): 模型映射 + 分组搜索 + 卡片折叠 + 冲突校验 · 29d58f24
      erio authored
      - 渠道模型映射:新增 model_mapping JSONB 字段,在账号映射之前执行
      - 分组选择:添加搜索过滤 + 平台图标
      - 定价卡片:支持折叠/展开,已有数据默认折叠
      - 模型冲突校验:前后端均禁止同一渠道内重复模型
      - 迁移 083: channels 表添加 model_mapping 列
      29d58f24
    • erio's avatar
      feat(channel): 模型标签输入 + $/MTok 价格单位 + 左开右闭区间 + i18n · dca0054e
      erio authored
      - 模型输入改为标签列表(输入回车添加,支持粘贴批量导入)
      - 价格显示单位改为 $/MTok(每百万 token),提交时自动转换
      - Token 模式增加图片输出价格字段(适配 Gemini 图片模型按 token 计费)
      - 区间边界改为左开右闭 (min, max],右边界包含
      - 默认价格作为未命中区间时的回退价格
      - 添加完整中英文 i18n 翻译
      dca0054e
    • erio's avatar
      feat(channel): 渠道管理系统 — 多模式定价 + 统一计费解析 · 91c9b8d0
      erio authored
      Cherry-picked from release/custom-0.1.106: a9117600
      91c9b8d0
  6. 03 Apr, 2026 3 commits
  7. 02 Apr, 2026 1 commit
  8. 31 Mar, 2026 1 commit
  9. 30 Mar, 2026 3 commits
  10. 29 Mar, 2026 3 commits
    • QTom's avatar
      feat(privacy): 为 OpenAI OAuth 账号添加前端手动设置隐私按钮 · 096d47b5
      QTom authored and 陈曦's avatar 陈曦 committed
      
      
      复用已有的 set-privacy API 端点,Handler 通过 platform 分发到
      ForceOpenAIPrivacy / ForceAntigravityPrivacy,前端 AccountActionMenu
      扩展隐私按钮支持 OpenAI OAuth 账号。
      Co-Authored-By: default avatarClaude Opus 4.6 (1M context) <noreply@anthropic.com>
      096d47b5
    • shaw's avatar
      feat(tls-fingerprint): 新增 TLS 指纹 Profile 数据库管理及代码质量优化 · b22ab6ad
      shaw authored and 陈曦's avatar 陈曦 committed
      新增功能:
      - 新增 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 回调签名被错误替换的问题
      b22ab6ad
    • 陈曦's avatar
  11. 27 Mar, 2026 1 commit